2.3.0 • Published 6 years ago
crcmop v2.3.0
React Component CLI
Info: ↓
This Will Allow You To Create React Components From CLI When You Use: ↓
$ create-react-app
OR any React app folder.- crcmop cli will create
index.js
in 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/';
Installation: ↓
If you on mac or linux sys be sure to use sudo
before npm
or yarn
$ npm install -g crcmop
$ yarn global add crcmop
Usage: ☀
- Create component with style →
$ crcmop add home --style --type jsx
**This will create in "src/components"
- :open_file_folder: Home
- Home.jsx
- Home.css
- Create component without style →
$ crcmop add home --type jsx
**This will create in "src/components"
- :open_file_folder: Home
- Home.jsx
- Create multi components with styles →
$ crcmop add home,list,item --style --type jsx
**This will create in "src/components"
- :open_file_folder: Home
- Home.css
- Home.jsx
- :open_file_folder: List
- List.css
- List.jsx
- :open_file_folder: Item
- Item.css
- Item.jsx
- Create multi components without styles →
$ crcmop add home,list,item --type jsx
**This will create in "src/components"
- :open_file_folder: Home
- Home.jsx
- :open_file_folder: List
- List.jsx
- :open_file_folder: 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"
* :open_file_folder: Home
* Home.css
* Home.d.ts
* Home.jsx
- Defaults: → --style: false → --type: js
- type:
$ crcmop add --help
for more help
Options: ☷
-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
Auther:
© Salehjarad