2017-07-08 8 views
1

新しいファイルを手動で作成するのではなく、新しいコンポーネントを作成するコマンドはありますか?同様au newだけのコンポーネントのために:コマンドラインでau generateを入力aurelia cliで新しいコンポーネントを作成するには?

hello.html

<template> 

    <!-- Hello template --> 

</template> 

hello.js

export class Hello { 

    constructor() { 

    } 

} 

答えて

3

はあなたの次のオプションのリストが表示されます:

$ 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. 

au generate Xと入力してください。ここでXはリストされているオプションの1つです。たとえば、au generate componentです。

関連する問題