1.0.9 • Published 3 years ago
biproxi-template-generator v1.0.9
biproxi-template-generator
Generate React components, hooks, Next.JS pages, and API services in line with biproxi conventions with a simple command.
How to Install
npm i biproxi-template-generator --save-dev
How it Works
- Install the library.
- Make an npm script for each template you want to build.
- ???
- Profit
Example:
{
scripts:
"buildComponent": "node ./node_modules/biproxi-template-generator/scripts/buildTemplate.js build component -n $npm_config_name -p $INIT_CWD",
"buildPage": ...
...
}
Run the script from the directory you want to generate the template in, specifying a name:
node run buildComponent --name=Button
React Component
- Common imports
- Styled container for component
- Typing for component props
- Component with State, Hooks, Actions, GraphQL, Effects, and Render sections
- Default export
Hook
Next.JS Page
Service (API)
To-dos
- Add Next.JS pages
- Add hooks
- Clean up this README
- Add API services and sub-components