salak-cli
v1.0.5
Published
A simple CLI for scaffolding Salak applications.
Downloads
36
Readme
salak-cli
Scaffolding for SalakJS.
Install
$ npm install -g salak-cli
The commands list:
- init: generate a new project from a template
- list: list available templates
- set: set available variables
Usage
init
alias: salak-init
Quick to create project.
$ salak init [template] [project-name]
$ salak init [template] [project-name] -u # force updating templates
$ salak init [template] [project-name] -q # quick create project with default options
$ salak init [template] [project-name] -p '{"name":"salak","author":"title"}' # the same as quick,provide default options,it must be include name and author key.
$ salak init -d /template-dir [project-name] # create project from local template
list
List the availabel templates from the official templates or the repo which you set.
alias: salak-list
$ salak list
$ salak list -u # find from online repo, otherwise find from local cache.
set
alias: salak-set
You can use your templates for replacing official templates,you need to create a repo which like templates.
$ salak set repo SalakJS/templates
If you use in your private repo, you must remove the git@ and .git, such as:
$ salak set repo git.xxx:username/repo
tip: you must use options '--clone' when you use private repo.
License
MIT