React's equivalent to Angular's "ng g".
Get the package:
npm install -D create-react-g
Configure the script in package.json
:
...
"scripts": {
"g": "node ./node_modules/create-react-g/index.js"
},
...
Just write:
npm run g <component-name>
And get the boilerplate:
/src/
components/
<component-name>/
component-name.component.js # includes boilerplate code
component-name.component.scss # includes boilerplate code
component-name.component.test.js # includes boilerplate code
As with Angular, the templates are strongly opinionated, so it follows a specific style. However, if you think that this package can add value to you with a little tweaking, feel free to fork it and customize it to your needs ๐.