CLI for quick and easy scaffolding in your apps
🚧 STILL A WIP 🚧
Caffo is a command line tool (cli) that allows you to scaffold your apps with minimal configuration. A typical workflow (from install to usage) is shown below:
- install
caffo
# install caffo
npm i caffo
- add the
caffo
script to youpackage.json
{
+ "caffo": "caffo"
}
- create a
templates
directory
mkdir templates
- populate your newly created
templates
directory with your templates. Your new templates can contain variables adhering to the handlebars syntax. For example:
// sample template file
import React, {component} from 'react'
class {{componentName}} extends Component {
render() {
return (
<div>Hello {{name}} from {{componentName}}</div>
)
}
}
You can also have directories inside of the templates
directory where all of the items inside of that directory are templates that will be created a one time. For example:
📂 templates
⎿ 📂 newComponent
⎿ 📝 template.js
📝 template.css
- use
caffo
# use the script created in step 2
npm run caffo
This will walk you through the process of filling in the variables in your templates. It will also ask you where you want your templates to be outputted.
- That's it!!!