Skip to content

Salehjarad/crcmop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Component CLI NPM version


CRCMOP CLI APP


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"
      • 📂 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 --help for more help

Options Defaults: 😊 ↓

Option Default
--type js
--style false
--props false

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


Working on more fast way to work with react.

About

Create component from cli for react app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors