
add-workspace
npm run add:workspace -- --args <workspaceType> <folderName> <packageName> <workspaceStructure> <packageDescription>
npx turbo gen add-workspace --args <workspaceType> <folderName> <packageName> <workspaceStructure> <packageDescription>
- 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 ❇️