Alt description missing in image

add-form

npm run add:form

Interactive, or with args (positional or named; --args optional):

npm run add:form -- --args <workspacePath> <formSchema> <formHookName>
npm run add:form -- features/@app-core HealthCheckInput useHealthCheckForm
npm run add:form -- --workspacePath features/@app-core --formSchema HealthCheckInput --formHookName useHealthCheckForm
        • add-form.ts

Prompt Arguments

ArgumentTypeQuestion / Description
workspacePathautocompleteWhere would you like to add this form?
=> e.g. features/@app-core
formSchemaautocompleteWhich zod / input schema should we use?
=> e.g. HealthCheckInput / new
formHookNametextWhat should the form hook be named?
=> string (e.g. useSomeSchemaState)

Resulting File Changes

/{workspacePath}/ # <- e.g. 'features/@app-core/' or 'packages/some-package/'
 └── hooks/
     └── {formHookName}.ts ❇️ # <- Will integrate with chosen / new schema