$ create-react-appOR any React app folder.- crcmop cli will create
index.jsin components folder and export the component you created so you can just import any component you created from components folder: ↓import {< here will be all your components >} from './components/';
$ npm install -g crcmop$ yarn global add crcmop
- Create component with style →
$ crcmop add home --style --type jsx
- This will create in "src/components"
- 📂 Home
- Home.jsx
- Home.css
- Create component without style →
$ crcmop add home --type jsx
- This will create in "src/components"
- 📂 Home
- Home.jsx
- Create multi components with styles →
$ crcmop add home,list,item --style --type jsx
- This will create in "src/components"
- 📂 Home
- Home.css
- Home.jsx
- 📂 List
- List.css
- List.jsx
- 📂 Item
- Item.css
- Item.jsx
- Create multi components without styles →
$ crcmop add home,list,item --type jsx
- This will create in "src/components"
- 📂 Home
- Home.jsx
- 📂 List
- List.jsx
- 📂 Item
- Item.jsx
- Create component with autocomplete for props when you call it from another component: ↓
$ crcmop add home --style --type jsx --props
- This will create in "src/components"
- 📂 Home
- Home.css
- Home.d.ts
- Home.jsx
- type:
$ crcmop add --helpfor more help
| Option | Default |
|---|---|
--type |
js |
--style |
false |
--props |
false |
-s, --style Create style with component [default: false]
-t, --type <type> File type [ js | jsx | tdx ] [default: js]
-p, --props To Create <component.name>.d.ts file for autocomplete props from the component.
-h, --help Output usage information© Salehjarad
