yarn add srz -D
or
npm i srz -d
npm i srz -g
Can be executed from anywhere with
_assist
command
_assist make:rc Example
Generates react component inside src directory
Make commands:
make:rc - REACT COMPONENT
make:vc - VUE COMPONENT
make:lrc - LARAVEL REACT COMPONENT
make:lvc - LARAVEL VUE COMPONENT
make:nxc - NEXT COMPONENT
make:nxp - NEXT PAGE
make:nxpd - NEXT DYNAMIC PAGE
make:nxp-ssr - NEXT PAGE WITH SSR
make:nxpd-ssr - NEXT DYNAMIC PAGE WITH SSR
Flags:
--help - to see the available commands
--ts - for typescript support
--name={name} - component name
npx srz make:lrc components/example
for react
this command will create a react component inside resources/js/component/example
with basic structure
npx srz make:rc components/example
this command will create a react component inside src/component/example
with basic structure
similarly for vue
npx srz make:vc components/example
for next components
npx srz make:nxc components/example
for next pages
npx srz make:nxp blog
for next dynamic pages
npx srz make:nxpd blog/blogId
for next SSR pages
npx srz make:nxpd-ssr blog
for next SSR dynamic pages
npx srz make:nxpd-ssr blog/blogId
npx srz make:rc component/example --ts
Add --ts
flag to generate typescript supported components
npx srz make:rc component/Blog/Create --name=CreateBlog
Add --name={componentName}
flag for naming the component