@tareqdayya/react-ts-files-generator
v1.4.1
Published
generates directories with react components, index, and stylesheet files inside
Downloads
40
Readme
This package automates the generation of React/RN Components in typescript.
Using the command line, and assuming we're creating a component ArticleTitle, you will be able
to generate the following files:
1- index.tsx
2- ArticleTitle.tsx
3- a style file: You can choose one of the following options:
'CSS'| 'SCSS'| 'Less'| 'Sass'| 'React Native Style'| 'Styled Components'.
4- an optional test file: ArticleTitle.test.tsx
INSTALLATION:
yarn add @tareqdayya/react-ts-files-generator --dev
or
npm i @tareqdayya/react-ts-files-generator --save-dev
HOW TO USE:
on the command line:
yarn gencomp
or
npm gencomp
You will get asked a few questions, answer them. Boilerplate code generated :)
- If the path to the files doesn't exist, worry not––the package will create the directories for you.