isa*_*sar 1 aurelia aurelia-cli
有没有创建新组件的命令,而不是手动创建新文件?像au new但仅适用于组件:
hello.html
<template>
<!-- Hello template -->
</template>
Run Code Online (Sandbox Code Playgroud)
hello.js
export class Hello {
constructor() {
}
}
Run Code Online (Sandbox Code Playgroud)
au generate在命令行中键入将为您提供以下选项列表:
$ au generate
_ _ ____ _ ___
__ _ _ _ _ __ ___| (_) __ _ / ___| | |_ _|
/ _` | | | | '__/ _ \ | |/ _` | | | | | | |
| (_| | |_| | | | __/ | | (_| | | |___| |___ | |
\__,_|\__,_|_| \___|_|_|\__,_| \____|_____|___|
No Generator Specified. Available Generators:
attribute
Creates a custom attribute class and places it in the project resources.
binding-behavior
Creates a binding behavior class and places it in the project resources.
component
Creates a custom component class and template (view model and view), placing them in the project source folder (or optionally in sub folders).
element
Creates a custom element class and template, placing them in the project resources.
generator
Creates a generator class and places it in the project generators folder.
task
Creates a task and places it in the project tasks folder.
value-converter
Creates a value converter class and places it in the project resources.
Run Code Online (Sandbox Code Playgroud)
只需键入au generate XX是列出的选项之一。例如au generate component。
| 归档时间: |
|
| 查看次数: |
695 次 |
| 最近记录: |