0.1.1 • Published 5 years ago
scaff-cli v0.1.1
🚀scaff-cli
(scaff is short word of "scaffolding")
Scaffold your frequently used files or folder structure using file based templates.
Getting Started
Install
$ yarn global add scaff-cli
// or
$ npm install -g scaff-cliUsage
1. Write your templates
$ mkdir -p .scaff/my-component
$ touch .scaff/my-component/index.js
$ touch .scaff/my-component/{{name}}.js
$ vi .scaff/my-component/{{name}}.js
// export default function {{name}} {}2. run scaff g command
my-component is folder name you wrote in .scaff folder.
$ scaff g
? Choose your template my-component
? Where to copy them? ./src/components/button
? What's component name? Button
// Now you can check these files.
//   - src/components/button/index.js
//   - src/components/button/Button.jsDocument
scaff command
- scaff generate
 
TODO
- Error handling
 - Support file type
 - Improve dialog
 - Add more commands
 - Add more variables option that can be replaced