add-workspace
npm run add:workspaceInteractive, or with args (positional, named, or mixed; --args optional):
npm run add:workspace -- --args <workspaceType> <folderName> <packageName> <workspaceStructure> <packageDescription>npm run add:workspace -- feature my-feature @app/my-feature schemas resolvers "Description"
npm run add:workspace -- --workspaceStructure schemas resolvers components --folderName my-feature --packageName @app/my-feature- add-workspace.ts
Prompt Arguments
| Argument | Type | Question / Description |
|---|---|---|
| workspaceType | radio | What type of workspace would you like to generate? => package / feature |
| folderName | text | What foldername do you want to give this workspace? => string |
| packageName | text | What package name would you like to import from? => string |
| workspaceStructure | checklist | Optional: What will this workspace contain? => schemas, resolvers, components, hooks, screens, routes, … |
| packageDescription | text | Optional: How would you shortly describe the package? => string |
Resulting Files
/{workspaceType}/ # <- e.g. packages/ or features/
└── {folderName}/ ❇️
└── {workspaceStructure}/ ❇️ # <- e.g. schemas/, resolvers/, components/, ...
└── package.json ❇️
└── tsconfig.json ❇️