init-from v0.0.12
init-from
init-fromis a small, and simple command-line tool that helps kickstart new projects.
It is based on zel : https://github.com/vutran/zel
It simply add a templating system on top so new project can be automatically configured
Benefits
- Simple JSON file to specify files via a
.zelfile - No complex generator/plugin API
- No need to publish your boilerplate on npm (there's too many!)
Install
$ npm i -g init-fromUsage
Create a .zel file in your boilerplate repository on GitHub and specify the files to expose to init-from and zel (if you do not need templating.
Repository: vutran/editorconfig
{
"files": [".editorconfig"]
}Running init-from
To quickly clone these files, simply run init-from <username>/<repository>.
$ init-from vutran/editorconfigThe above command will download .editorconfig from the vutran/editorconfig repository into the current working directory.
That's it!
Dependencies
Sometimes, your boilerplate may depend on other boilerplates. You can depend on other repositories by adding it to the dependencies list in your .zel file.
Repository: vutran/new
{
"dependencies": [
"vutran/editorconfig",
"vutran/gitignore"
]
}And to bootstrap your new project:
$ init-from vutran/newCommands
Scaffold a project
$ init-from vutran/newScaffolding a private GitHub repository
$ init-from vutran/new --token abc123Specifying a target directory for your new project
$ init-from vutran/new --target ~/Project/MyNewProjectWant to scaffold your user home directory?
$ init-from vutran/home --homeFor more information
$ init-from -hContributing
- Clone the repository:
git clone git@github.com:wighawag/init-from.git - Install dependencies:
npm installoryarn - Install flow-typed typings:
npm run flow-typed - Start Fly dev task:
npm run dev - Make edits, commit
- Submit a PR.
License
MIT © Vu Tran and Ronan Sandford