Are you sick of configuring your projects from scratch over and over again ?
Are you a library author ?
Do you experiment much ?
This is the tool you need.
Install globally with npm i -g @rakentaja/cli
or yarn global add @rakentaja/cli
Add a rakentaja.json
to the root of your tempaltes folder having the structure :
{
keys: {[key:string]:any} // Default keys for the templates in the project
commands: string[]; // Commands to run after project is created
ignore: string[] // An array of glob strings
}
rakentaja <source> [target]
Create a project from template
Positionals:
source Source directory or a git URL. If that is a valid git URL, rakentaja
will attempt to clone the repository.
NOTE: Git support will arive in next major version! [string]
target Target directory to generate project [string] [default: "./"]
Options:
--version Show version number [boolean]
--help Show help [boolean]
Pass the template directory :
rakentaja myTemplateFolder ./MyProject
- Support
.zip
packages for templates - Add git support
!!! Git support is not working yet!
Feel free to add tests and report bugs.
Please make a pull request to dev branch
And please do not forget to bump the version! Check out SemVer