create-koa-boot 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -209,6 +209,15 @@ async function main() {
|
|
|
209
209
|
console.log(' ✓ AGENTS.md(AI 开发规则)已生成');
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
// 根级 package.json(workspace 入口,供 pnpm install 安装所有端依赖)
|
|
213
|
+
const rootPkgSrc = path.join(TEMPLATE_DIR, 'package.json');
|
|
214
|
+
if (fs.existsSync(rootPkgSrc)) {
|
|
215
|
+
const pkg = JSON.parse(fs.readFileSync(rootPkgSrc, 'utf8'));
|
|
216
|
+
pkg.name = projectName;
|
|
217
|
+
fs.writeFileSync(path.join(targetDir, 'package.json'), JSON.stringify(pkg, null, 2) + '\n', 'utf8');
|
|
218
|
+
console.log(' ✓ package.json(workspace 入口)已生成');
|
|
219
|
+
}
|
|
220
|
+
|
|
212
221
|
patchExampleBackend(targetDir, projectName);
|
|
213
222
|
console.log(' ✓ backend/package.json 已配置');
|
|
214
223
|
} else {
|
package/package.json
CHANGED