README
utils-react-typescript-materialui-cli CLI
Utilities CLI for react tipescript using ui material, jest tests, and storybook
Installation
You can install the package from npm.
npm i --global utils-react-typescript-materialui-cli
or with yarn
yarn global add utils-react-typescript-materialui-cli
done this the cli can be executed with:
utils-react-typescript-materialui-cli Command
or locally
yarn add utils-react-typescript-materialui-cli -D
to use locally, it is necessary to create a command in the package.json file, as follows:
...
"scripts": {
...
"urtmui": "utils-react-typescript-materialui-cli"
}
...
done this the cli can be executed with:
yarn urtmui Command
🔨 Commands
make:component
Create a typescript component with support for css-in-js of the material-ui, with options for generating files for testing and storybook
ALIAS
m:c
USAGE
$ make:component ARGUMENTS OPTIONS
ARGUMENTS
DIR name of the component folder inside the components folder
NAME(Optional) component file name, if this parameter is missing an index.tsx file will be created
OPTIONS
--storie create a storybook story file
--test create a test file
--forward create component refs
make:reducer
create a separate reducer in its own folder with its types and actions, and automatically include that reducer in the combineReducer in the index.ts file in the store folder
ALIAS
m:r
USAGE
$ make:reducer ARGUMENTS
ARGUMENTS
DIR name of the folder where the reducer will be, the types and actions