This project uses hygen
for generating client code using templates. For each template a prompt would be shown.
Make sure to provide all the names in kebab-case.
-
npx hygen page new
field description name
Name of the page. Make sure to use kebab-case name. It would create the page directory (
src/pages/page-name
) withindex.ts
and<name>.tsx
files. -
npx hygen page sub-component
field description name
Name of the Component. parent
Name of the page where this sub-component is to be created It would create the
<name>.tsx
insidesrc/pages/<parent>/components/
directory. -
npx hygen page hook
field description name
Name of the Make sure the hook-name doesn't contain use word. The hook file and function would be prefixed with use word automatically. parent
Name of the page where this sub-component is to be created It would create
use-<name>.tsx
insidesrc/pages/<parent>/hooks/
directory.
-
npx hygen component new
field description name
Name of the page. Make sure to use kebab-case name. It would create the component directory (
src/components/<name>
) withindex.ts
and<name>.tsx
files. -
npx hygen component sub-component
field description name
Name of the Component. parent
Name of the component where this sub-component is to be created It would create the
<name>.tsx
insidesrc/components/<parent>/components/
directory.
-
npx hygen hook new
field description name
Name of the Make sure the hook-name doesn't contain use word. The hook file and function would be prefixed with use word automatically. It would create
use-<name>.tsx
insidesrc/hooks/
directory. Make sure the hook-name doesn't contain use word. The hook file and function would be prefixed with use word automatically.