0.4.0 ⢠Published 7 years ago
caffo v0.4.0
caffo
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
caffoscript to youpackage.json
{
+ "caffo": "caffo"
}- create a
templatesdirectory
mkdir templates- populate your newly created
templatesdirectory 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 caffoThis 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!!!