scaff-cli

0.1.1 • Public • Published

🚀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-cli

Usage

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.js

Document

scaff command

  • scaff generate

TODO

  • [ ] Error handling
  • [ ] Support file type
  • [ ] Improve dialog
  • [ ] Add more commands
  • [ ] Add more variables option that can be replaced

Readme

Keywords

none

Package Sidebar

Install

npm i scaff-cli

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

3.68 kB

Total Files

4

Last publish

Collaborators

  • gwanduke