1.0.3 • Published 5 years ago
@skr571999/create-react-component v1.0.3
Create React Component
Simple package for creating React component.
Installing
npm i -g @skr571999/create-react-componentor Running using npx(without Installing)
npx @skr571999/create-react-component -n ComponentNameUsage/Options
Usage: create-react-component -n <name>
Options:
--help Show help [boolean]
--version Show version number [boolean]
-n, --compName Component name [string] [required]
-l, --language Language [js, ts(default)] [string]
-c, --component Make component [No(default)] [boolean]Examples
- For
JavaScript
cd src
create-react-component -n TextBox -l js
# will create following component structure
src
├── components
├── TextBox
├── textbox.view.jsx
└── index.js- For
TypeScript
cd src
create-react-component -n TextBox
# will create following component structure
src
├── components
├── TextBox
├── textbox.view.tsx
└── index.ts- For
TypeScriptwith a.container.tsxfile
cd src
create-react-component -n TextBox -c
# will create following component structure
src
├── components
├── TextBox
├── textbox.container.tsx
├── textbox.view.tsx
└── index.ts