Create project is a command line tool for create new project from a boilerplate.
Check out the examples.
go get -u github.com/frozzare/create-project
or using homebrew.
brew install frozzare/tap/create-project
Create a project.json in your boilerplate directory.
{
"name": "simple"
}Then create a directory called {{.name}} with a main.js file that contains this:
var {{.name}} = function () {};Then run:
create-project my-boilerplate dest-folder
You can also use a git url:
create-project https://github.com/user/my-boilerplate.git dest-folder
You can add labels to all fields using another JSON structure in your project.json
{
"fields": {
"name": "app"
},
"labels": {
"name": "Name"
}
}Commands array can be added when using labels. The commands will be executed after the project is generated.
{
"fields": {
"name": "app"
},
"labels": {
"name": "Name"
},
"commands": [
"touch test"
]
}MIT © Fredrik Forsmo