Skip to content

tareqdayya/react-ts-files-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Generates directory with files for a react component. creates an index file, a component file, a stylesheet file, and an optional test file. Works for ts only!

Resources

License

Stars

Watchers

Forks