FA Module Generator (React app)
This package generates a Module in FA React applications. The module contains preconfigured
components, helpers, pages, router, services, store, tests, translations, triggers
Installation
All the following steps are already done in repo fa-react-app
and any of its forks.
-
Add Plop to your project.
npm install --save-dev plop
-
Add this package to your project.
npm install --save-dev @fasolutions/module
-
Create a plopfile.js
at the root of your project.
module.exports = function (plop) {
// Load plop react here
plop.load('@fasolutions/module');
// You can load other plop module or define your own plop generators or helpers, here
};
-
Add script
inside your package.json
, for running plop generator
"module": "plop"
-
Run script to create Module
npm run module
Hint: Append script with Module Id to save time. Eg. npm run module moduleid