1.0.1 • Published 3 years ago

momkai-react-cli v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Momkai CLI tools

Usage

  1. Add the following line to the scripts object in package.json

      "scripts": {
        "generate": "node tools/generate.js
      }
  2. Update the folder path settings in tools/settings.js

    const scriptSettings = {
      components: {
        path: 'components'
      },
      context: {
        path: 'context'
      },
      styles: {
        global: {
          path: 'styles/global/global.scss'
        }
      }
    }
  3. Run either yarn run generate component <ComponentName> or npm run generate component <ComponentName> to generate the component folder with corresponding .scss and .js files. The styling will automatically be added to the file containing all global style imports.

Templates

The templates in the tools/templates folder can be changed freely. Just use {{name}} to insert the component name.