0.1.0 • Published 5 years ago
generator-client-swag v0.1.0
generator-client-swag
This is a yeoman generator for a faster client side development
Installing
Run from your terminal:
npm install yo -g
npm isntall generator-client-swag -g
Usage
Dumb component with unit test (not connected to redux)
yo client-swag:component {{ComponentName}}
Will create next file structure:
+-- {{component-name}}
| -- index.js
| -- {{compnent-name}}.jsx
| -- {{compnent-name}}.spec.jsx
| -- {{compnent-name}}.scss
Dumb component without unit test (not connected to redux)
Adding --skip-test option will skip test file.
yo client-swag:component {{ComponentName}} --skip-test
Will create next file structure:
+-- {{component-name}}
| -- index.js
| -- {{compnent-name}}.jsx
| -- {{compnent-name}}.scss
Smart component with unit test (connected to redux)
yo client-swag:container {{ConteinerName}}
Will create next file structure:
+-- {{component-name}}
| -- index.js
| -- {{compnent-name}}.jsx
| -- {{compnent-name}}.spec.jsx
| -- {{compnent-name}}.scss
Smart component with unit test (connected to redux)
Adding --skip-test option will skip test file.
yo client-swag:container {{ConteinerName}} --skip-test
Will create next file structure:
+-- {{component-name}}
| -- index.js
| -- {{compnent-name}}.jsx
| -- {{compnent-name}}.scss
Redux store slice
yo client-swag:redux {{sliceName}}
Will create next file structure:
+-- {{slice-name}}
| -- {{slice-name}}.reducor.js
| -- {{slice-name}}.actions.js
| -- {{slice-name}}.selectors.js
| -- {{slice-name}}.dispatchers.js