feat(create-nextrush): scaffold production-ready project foundation
- 主要語言
- TypeScript
- 星號
- 4
- 分支
- 0
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 1
描述
## Summary
Improve the default project scaffolding generated by `create-nextrush` so new projects start with a more complete foundation, not just source folders.
## Motivation
The current scaffolder already does a strong job generating the application structure, but users still need to add common project-level files manually after scaffolding.
## Proposed changes
Generate these by default:
- `.env`
- `.env.example`
- `.editorconfig`
- `.gitignore`
- `README.md`
- `package.json`
- `tsconfig.json`
- `src/env.d.ts`
Add or improve the generated `package.json` so it includes useful defaults such as:
- `engines.node` set to `>=22`
- standard scripts like `dev`, `build`, `test`, `lint`, `typecheck`
- clear `private`, `type`, and package manager metadata
Provide a centralized environment setup so generated apps avoid reading `process.env` everywhere.
## Environment example
`.env`
```env
PORT=3000
HOST=0.0.0.0
NODE_ENV=development
```
`.env.example`
```env
PORT=
HOST=
NODE_ENV=
```
## Why
This would make the generated project feel much more production-ready from day one and reduce repetitive manual setup.
## Scope
Keep the default scaffold lightweight, but make the baseline closer to what developers typically expect in a real project.
## Non-goals
- Do not add framework configuration files unless they clearly remove complexity.
- Do not make the default scaffold too heavy.
- Do not introduce arbitrary custom template/plugin support.
## Acceptance criteria
- A freshly generated project includes the common root-level project files.
- Environment configuration is centralized.
- The default generated app still stays simple and testable.
- Existing scaffold styles continue to work.
貢獻指南
研究方向
Look at the create-nextrush CLI tool's template generation logic, likely in a directory like `packages/create-nextrush` or `cli/`. Examine how it currently scaffolds the project structure. The task is to modify the template to include the listed root files (.env, .gitignore, README.md, package.json, tsconfig.json, etc.) with the specified content. Start by running the scaffolder locally to see the current output, then update the template files. Ensure the generated package.json includes the proposed scripts and metadata. Test by generating a new project and verifying all files are present and correct.
由索引模型根據 Issue 內容生成。
評估
- 領域
- backend, cli, tooling
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100