add-schema
npm run add:schemaInteractive, or with args (positional, named, or mixed; --args optional):
npm run add:schema -- --args <workspacePath> <schemaName> <schemaDescription>npm run add:schema -- packages/@green-stack-core MySchema "Description"
npm run add:schema -- --workspacePath packages/@green-stack-core --schemaName MySchema --schemaDescription "Description"- add-schema.ts
Prompt Arguments
| Argument | Type | Question / Description |
|---|---|---|
| workspacePath | autocomplete | Where would you like to add this schema? => e.g. features/@app-core |
| schemaName | text | What is the schema name? => string |
| schemaDescription | text | Optional description: What data structure does this schema describe? => string |
Resulting File Changes
/{workspacePath}/ # <- e.g. 'features/@app-core/' or 'packages/some-package/'
└── schemas/
└── {schemaName}.schema.ts ❇️