Skip to content

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

License

Notifications You must be signed in to change notification settings

frozzare/create-project

Repository files navigation

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