feat(create-nextrush): add scaffold presets for project templates
- 主要語言
- TypeScript
- 星號
- 4
- 分支
- 0
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 1
描述
## Summary
Add scaffold presets to `create-nextrush` so users can choose a project foundation based on their needs instead of always getting the same baseline.
## Why this matters
As the scaffolder grows, the default experience should stay simple, but more advanced users will need a clearer way to opt into a richer setup. Presets make the generator easier to understand, easier to extend, and easier to document.
## Proposal
Introduce a preset selection layer in the scaffolder. Example presets:
- `minimal`
- `api`
- `production`
- `microservice`
Each preset should map to a defined set of generated files, dependencies, scripts, and optional features.
## Example preset behavior
### Minimal
Best for small projects and quick starts.
Includes only the essentials:
- `package.json`
- `tsconfig.json`
- `README.md`
- `.gitignore`
- basic source layout
### API
Best for typical backend APIs.
Includes:
- environment scaffolding
- linting configuration
- testing configuration
- API-focused source structure
- useful scripts
### Production
Best for teams that want deployment-ready defaults.
Includes:
- everything in `api`
- Docker support
- CI workflow
- editor defaults
- stronger metadata in `package.json`
### Microservice
Best for service-oriented systems.
Includes:
- health checks
- observability-friendly structure
- runtime and deployment defaults
- container-friendly setup
## Acceptance criteria
- Users can select a preset during scaffolding
- Each preset produces a clearly defined file set
- Presets remain curated rather than becoming arbitrary template plugins
- The default experience stays lightweight
- Documentation explains what each preset includes
## Non-goals
- Do not allow arbitrary user-defined scaffold plugins
- Do not make the CLI overly complex
- Do not force advanced files into the minimal preset
## Notes
This issue should focus on the preset abstraction itself. Individual files like env, lint, Docker, or CI should continue to be tracked in separate implementation issues.
貢獻指南
評估
這個 Issue 還沒有評估資料。