1.1.0 • Published 5 months ago

@aliraza944/react-cli v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

A CLI that let's you create boilerplate's for react components, redux files and custom hooks

🎩 INSTALLATION

Install the CLI globally. If you are Windows user, run your Command Prompt or Terminal as Administrator.

npm i -g @aliraza944/react-cli

⚙️ USAGE

Simple React File

To create a simple react file in a specific folder you have to run the following command in the root directory you your project

rc file <your-file-name> <your-file-folder> 

This will create a directory for your file which will contain a <your-file-name>.jsx file and an index.jsx from which your file will be default exported in the specified folder. If you leave the folder empty it will create the file in the root directory of your project.

Components

To create a component you have to run the following command in the root directory you your project

rc component <your-component-name>

This will create a components folder in you components directory. This folder will contain the <your-component-name>.jsx file and an index.jsx file form which your component will be default exported.

Component's Custom Hook

To create a component with custom hook you have to run the following command root directory you your project

rc component <your-component-name> --hook <your-hooks-dir>

This will create a components folder in you components directory. This folder will contain the <your-component-name>.jsx file and an index.jsx file form which your component will be default exported. It will also create a use<your-component-name>.js file in the specified hook directory. If you don't specify the folder for your custom hook it will create the hook in same directory of you component.

Custom Hooks

To create a custom hook you have to run the following command in the root directory you your project

rc hook <your-hook-name> [your-hooks-dir]

This will create a <your-hook-name>.js file in the specified hooks directory. By default it will create the hook in the hooks directory if you don't specify the folder for it.

1.1.0

5 months ago

1.0.2

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.12

10 months ago

1.0.1

1 year ago

1.0.0

1 year ago