Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 1.67 KB

readme.md

File metadata and controls

82 lines (59 loc) · 1.67 KB

create-project Build Status GoDoc Go Report Card

Create project is a command line tool for create new project from a boilerplate.

Check out the examples.

Installation

go get -u github.com/frozzare/create-project

or using homebrew.

brew install frozzare/tap/create-project

Usage

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

Labels

You can add labels to all fields using another JSON structure in your project.json

{
    "fields": {
        "name": "app"
    },
    "labels": {
        "name": "Name"
    }
}

Commands

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"
    ]
}

License

MIT © Fredrik Forsmo