sakina-react
React new typescript component file template code generator.
Install
pnpm add -g sakina-react
Usage
Simple component
such as project files tree:
└─ project
└─ src
└─ components # (in this dir exec command)
in project/src/components
exec:
sr gs AnimaList
then generate a simple react component file:
└─ project
└─ src
└─ components
└─ AnimaList.tsx
// AnimaList.tsx
import React from 'react'
export interface IAnimeListProps {}
export const AnimeList: React.FC<IAnimeListProps> = (props) => {
return (
<div>content</div>
)
}
With style component
such as:
sr g AnimeList
then generate a component with style file:
└─ project
└─ src
└─ components
└─ AnimaList
├─ index.tsx
└─ index.module.scss
License
MIT