Skip to content

A NPM Package use to generate react typescript components

Notifications You must be signed in to change notification settings

ravuthz/create-component-react-ts

Repository files navigation

Create Component React TS

A NPM Package use to generate react typescript components using plop.

Run on npx

npx create-component-react-ts component TodoTable
npx create-component-react-ts layout AdminLayout
npx create-component-react-ts page TodoPage
npx create-component-react-ts context Todo
npx create-component-react-ts hook Todo
npx create-component-react-ts service ApiTodo
npx create-component-react-ts utils Storage 

Install

Using NPM

npm i create-component-react-ts
# or
npm install --save create-component-react-ts

npm install --global create-component-react-ts

Or Yarn

yarn add create-component-react-ts

yarn global add create-component-react-ts

Usage

Add ./node_modules/.bin/create-component-react-ts to package.json scripts also can alias to short name

{
  "scripts": {
    "create-component-react-ts": "./node_modules/.bin/create-component-react-ts",
    "create-react": "./node_modules/.bin/create-component-react-ts"
  }
}
npm run create-react component Example1
npm run create-component-react-ts component Example1

yarn create-react component Example1
yarn create-component-react-ts component Example1

Example

yarn create-component-react-ts component TodoTable
yarn create-component-react-ts layout AdminLayout
yarn create-component-react-ts page TodoPage
yarn create-component-react-ts context Todo
yarn create-component-react-ts hook Todo
yarn create-component-react-ts service ApiTodo
yarn create-component-react-ts utils Storage

NOTE: Required packages

npm install --save react-router-dom
npm install --save @testing-library/react-hooks
# or
yarn add react-router-dom
yarn add @testing-library/react-hooks

About

A NPM Package use to generate react typescript components

Resources

Stars

Watchers

Forks

Packages

No packages published