Skip to content

Usage

Here are some uses of the cli on tools-web.

React

Basic command:

  • Start command
    bash
    react -h
    react -h
  • Create new component
    bash
    react make:component Button
    react make:component Button --style sass # with generate style (css,sass,scss)
    react make:component Button
    react make:component Button --style sass # with generate style (css,sass,scss)
  • Create new route
    bash
    react make:route World /world
    react make:route World /world --ts # typescript format
    react make:route World /world --style sass # with generate style (css,sass,scss)
    react make:route World /world
    react make:route World /world --ts # typescript format
    react make:route World /world --style sass # with generate style (css,sass,scss)
  • Generate store redux toolkit
    bash
    react make:toolkit users --type reducer
    react make:toolkit users --type async --url http://localhost:8000/api/users
    react make:toolkit users --type reducer
    react make:toolkit users --type async --url http://localhost:8000/api/users

Integration framework/library command:

bash
react add:mui
react add:antd
react add:styled
react add:recoil
react add:toolkit
react add:route
react add:mui
react add:antd
react add:styled
react add:recoil
react add:toolkit
react add:route

Cheatsheet

CommandDescriptionArgumentsOptions
add:muiProject integration with Material UI
add:antdProject integration with Ant Design
add:styledProject integration with Styled Components
add:recoilProject integration with Recoil
add:toolkitProject integration with Redux-Toolkit
add:routeProject integration with React Router
make:componentGenerate component<name>--style (css, sass, scss)
make:routeGenerate route pages<name> <url>--style (css, sass, scss)
make:toolkitGenerate store redux toolkit<name>
--type (async, reducer)
--url <url> for [async]

Released under the MIT License.