/caffo

CLI for quick and easy scaffolding in your apps

Primary LanguageJavaScriptMIT LicenseMIT

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:

  1. install caffo
# install caffo
npm i caffo
  1. add the caffo script to you package.json
{
+  "caffo": "caffo"
}
  1. create a templates directory
mkdir templates
  1. 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
  1. 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.

  1. That's it!!!