Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
project-starter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d1c7f6ef
authored
Nov 18, 2026
by
venus
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: create 补齐 githooks/docs/README 复制,保证派生项目门禁随基座分发
1 parent
069f2699
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
cli/lib/create.mjs
cli/lib/create.mjs
View file @
d1c7f6e
...
...
@@ -8,7 +8,7 @@
* - 根配置(package.json 包名换成 <name>;pnpm-workspace/turbo/tsconfig 原样)
* - apps/example:一个最小占位子应用(派生应用可删可改)
* - packages/common:一个业务公共模块示例(派生应用可改可扩)
* -
README / .gitignore
* -
githooks/、docs/、README.md:提交门禁与文档(随基座分发)
* 不含:node_modules、dist、.git、备份、生成物。
*/
import fs from 'node:fs';
...
...
@@ -140,11 +140,17 @@ export function createProject(name, parentDir) {
// 2. 复制 CLI 工具链
copyDir(path.join(TEMPLATE_ROOT, 'cli'), path.join(target, 'cli'));
// 2b. 复制提交门禁 hook 与文档(门禁必须随基座分发,否则派生项目无法拦截内核篡改)
for (const dir of ['githooks', 'docs']) {
const s = path.join(TEMPLATE_ROOT, dir);
if (fs.existsSync(s)) copyDir(s, path.join(target, dir));
}
// 3. 复制根配置,替换包名
const rootFiles = [
'package.json', 'pnpm-workspace.yaml', 'tsconfig.base.json', 'turbo.json',
'eslint.config.js', '.env.example', '.editorconfig', '.prettierrc.json',
'.prettierignore', '.npmrc', '.gitignore',
'.prettierignore', '.npmrc', '.gitignore',
'README.md',
];
for (const f of rootFiles) {
const s = path.join(TEMPLATE_ROOT, f);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment