silhouette-cli
Command line tool for silhouette
Install
$ npm install -g silhouette-cli
Usage
Run commands in your app's root directory.
$ silhouette help
Commands
silhouette create --project
Create a silhouette app in the current directory.
Examples
$ silhouette create --project # Short option also works $ silhouette create -p
silhouette create --all <name>
Create a controller, view, and stylesheet.
Examples
# Create a controller and stylesheet called ProductListingCtrl and a view called product-listing $ silhouette create --all product_listing # Short option also works $ silhouette create -a product_listing
silhouette create --controller <name>
Create a controller.
Examples
# Create a controller called ProductListingCtrl $ silhouette create --controller product_listing # Short option also works $ silhouette create -c product_listing
silhouette create --style <name>
Create a stylesheet.
Examples
# Create a stylesheet called ProductListingCtrl $ silhouette create --style product_listing # Short option also works $ silhouette create -s product_listing
silhouette create --view <name>
Create a view.
Examples
# Create a view called product-listing $ silhouette create --view product_listing # Short option also works $ silhouette create -v product_listing
silhouette help [<command>]
Output usage information. Passing the name of the command as a parameter will output the help information for that specific command.
Examples
$ silhouette help $ silhouette help create # Long and short options also works $ silhouette --help create $ silhouette -h create
silhouette version
Output version number.
Examples
$ silhouette version # Long and short options also works $ silhouette --version $ silhouette -v
Misc
File Types
Controllers
Silhouette uses AngularJS for controllers. .js
files are generated by this tool.
Stylesheets
Silhouette uses Stylus for stylesheets (compiled as .css
). .styl
files are generated by this tool.
Views
Silhouette uses Jade for views. .jade
files are generated by this tool.
Naming
Controllers and Styles
Names of controller and style files are converted into upper camel cased words suffixed with "Ctrl".
Examples
The following will be converted to HelloWorldCtrl
- "HelloWorld"
- "hello world"
- "Hello World"
- "helloWorld"
- "hello-world"
- "hello world"
Views
Names of view files are converted into lower cased, dash-separated words.
Examples
The following will be converted to hello-world
- "HelloWorld"
- "hello world"
- "Hello World"
- "helloWorld"
- "hello-world"
- "hello world"