No more clicking around to create files in your react project! Awesome React Generator is Command Line Tool that let's you generate component files/folders without leaving your terminal.
🏠 Homepage
npm install awesome-react-generator -g
rg component rfc hello-world
Check out the commands here
Let's say you don't want to pass --test
option every time you want to generate a component with test file.
You can create a config file .rgrc.js
at the root of your project to override CLI options.
Example below:
/* this will generate test file with .spec.js extension
and modular css file for every generated component */
module.exports = {
component: {
options: {
test: true,
cssType: "modular",
testExt: "spec-js",
},
},
};
or
/* this will generate test file with .spec.js extension and modular
css file for every generated component but for rfc type component it
will generate test file with extension .test.js and normal css file */
module.exports = {
component: {
rfc: {
testExt: "test-js",
cssType: "normal",
},
options: {
test: true,
cssType: "modular",
testExt: "spec-js",
},
},
};
rg -h
npm run test
👤 Tabrez Khan
- Website: https://iamtabrezkhan.github.io
- Twitter: @TabrezX
- Github: @iamtabrezkhan
- LinkedIn: @iamtabrezkhan
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 Tabrez Khan.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator