1.0.1 • Published 3 years ago
momkai-react-cli v1.0.1
Momkai CLI tools
Usage
Add the following line to the scripts object in package.json
"scripts": { "generate": "node tools/generate.js }
Update the folder path settings in
tools/settings.js
const scriptSettings = { components: { path: 'components' }, context: { path: 'context' }, styles: { global: { path: 'styles/global/global.scss' } } }
Run either
yarn run generate component <ComponentName>
ornpm 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.