0.1.4 • Published 1 year ago
cr-components v0.1.4
Create React Components
This package created to simplify React components structure creation in new React project.
Warning
Don't use this module in your old React projects, module can cause damage. You are free to use this in new React project.
How to use it?
- Create new React project. Read a official CRA docs to know how to do this.
- Create config with name
components.yml
. It can looks like:# components.yml app: # it is the folder components: # it is the folder - App # it is the component client: Header: components: - Header - Navbar - NavbarMenu shared: components: - Button - Logo
- Run
npx cr-components create-all
to parse and create components from a config.
Every component`s folder will be created with next files: Component.jsx, Component.css, index.js.
Example folder tree:
├───app
│ └───components
│ └───App
├───client
│ └───Header
│ └───components
│ ├───Header
│ ├───Navbar
│ └───NavbarMenu
└───shared
└───components
├───Button
└───Logo
Advice
Run cr-components create-all -h
to see more options.