@icebreakers/monorepo-templates 1.1.0 → 1.2.0
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/README.md +12 -8
- package/README.zh-CN.md +16 -0
- package/assets/.changeset/ledger.yaml +25 -0
- package/assets/.github/ISSUE_TEMPLATE/config.yml +1 -1
- package/assets/AGENTS.md +4 -3
- package/assets/CONTRIBUTING.md +27 -2
- package/assets/SECURITY.md +12 -14
- package/assets/package.json +13 -4
- package/package.json +6 -4
- package/templates/cli/package.json +11 -4
- package/templates/client/package.json +17 -1
- package/templates/server/package.json +11 -4
- package/templates/tsdown/package.json +11 -4
- package/templates/vitepress/.vitepress/config.ts +146 -165
- package/templates/vitepress/ai/index.md +12 -23
- package/templates/vitepress/ai/llms-txt.md +13 -31
- package/templates/vitepress/getting-started.md +3 -32
- package/templates/vitepress/index.md +27 -30
- package/templates/vitepress/knowledge/index.md +17 -41
- package/templates/vitepress/monorepo/commands.md +13 -18
- package/templates/vitepress/monorepo/index.md +22 -100
- package/templates/vitepress/monorepo/manage.md +15 -227
- package/templates/vitepress/monorepo/publish.md +15 -70
- package/templates/vitepress/monorepo/templates.md +10 -17
- package/templates/vitepress/monorepo/troubleshooting.md +13 -16
- package/templates/vitepress/package.json +10 -4
- package/templates/vitepress/public/_redirects +3 -0
- package/templates/vitepress/repoctl/adopt-existing.md +51 -53
- package/templates/vitepress/repoctl/aliases.md +18 -18
- package/templates/vitepress/repoctl/checks.md +21 -68
- package/templates/vitepress/repoctl/commands.md +16 -64
- package/templates/vitepress/repoctl/config.md +14 -35
- package/templates/vitepress/repoctl/doctor.md +20 -60
- package/templates/vitepress/repoctl/execution-model.md +16 -69
- package/templates/vitepress/repoctl/getting-started.md +34 -40
- package/templates/vitepress/repoctl/index.md +33 -61
- package/templates/vitepress/repoctl/reports.md +20 -74
- package/templates/vitepress/repoctl/scenarios.md +26 -28
- package/templates/vitepress/repoctl/template-assets.md +19 -88
- package/templates/vitepress/repoctl/templates.md +50 -81
- package/templates/vitepress/repoctl/troubleshooting.md +32 -46
- package/templates/vitepress/repoctl/workflows.md +38 -67
- package/templates/vitepress/thinking.md +4 -85
- package/templates/vitepress/tools/changeset.md +9 -59
- package/templates/vitepress/tools/husky.md +6 -124
- package/templates/vitepress/tools/index.md +13 -32
- package/templates/vitepress/tools/lint-staged.md +5 -96
- package/templates/vitepress/tools/llms-txt.md +4 -6
- package/templates/vitepress/tools/pnpm.md +7 -119
- package/templates/vitepress/tools/renovate.md +3 -87
- package/templates/vitepress/tools/turborepo.md +5 -157
- package/templates/vitepress/why/how-to-reuse-js-code.md +6 -247
- package/templates/vitepress/why/index.md +14 -1
- package/templates/vitepress/why/js-cjs-mjs.md +9 -96
- package/templates/vitepress/why/js-keywords.md +4 -129
- package/templates/vitepress/why/modern/bundlers.md +3 -50
- package/templates/vitepress/why/modern/dts.md +4 -90
- package/templates/vitepress/why/modern/esm-vs-cjs.md +4 -81
- package/templates/vitepress/why/modern/index.md +10 -51
- package/templates/vitepress/why/modern/package-entry-points.md +6 -117
- package/templates/vitepress/why/modern/typescript.md +4 -152
- package/templates/vitepress/why/publish-basic-npm-package.md +17 -144
- package/templates/vitepress/why/what-is-npm-package.md +4 -159
- package/templates/vitepress/zh/ai/index.md +33 -0
- package/templates/vitepress/zh/ai/llms-txt.md +42 -0
- package/templates/vitepress/zh/getting-started.md +40 -0
- package/templates/vitepress/zh/index.md +66 -0
- package/templates/vitepress/zh/knowledge/index.md +50 -0
- package/templates/vitepress/zh/monorepo/commands.md +21 -0
- package/templates/vitepress/zh/monorepo/index.md +115 -0
- package/templates/vitepress/zh/monorepo/manage.md +243 -0
- package/templates/vitepress/zh/monorepo/publish.md +87 -0
- package/templates/vitepress/zh/monorepo/templates.md +21 -0
- package/templates/vitepress/zh/monorepo/troubleshooting.md +20 -0
- package/templates/vitepress/zh/repoctl/adopt-existing.md +135 -0
- package/templates/vitepress/{en → zh}/repoctl/aliases.md +18 -18
- package/templates/vitepress/zh/repoctl/checks.md +86 -0
- package/templates/vitepress/zh/repoctl/commands.md +168 -0
- package/templates/vitepress/zh/repoctl/config.md +90 -0
- package/templates/vitepress/zh/repoctl/doctor.md +86 -0
- package/templates/vitepress/zh/repoctl/execution-model.md +81 -0
- package/templates/vitepress/zh/repoctl/getting-started.md +122 -0
- package/templates/vitepress/zh/repoctl/index.md +102 -0
- package/templates/vitepress/zh/repoctl/reports.md +94 -0
- package/templates/vitepress/{en → zh}/repoctl/scenarios.md +28 -26
- package/templates/vitepress/zh/repoctl/template-assets.md +116 -0
- package/templates/vitepress/zh/repoctl/templates.md +159 -0
- package/templates/vitepress/zh/repoctl/troubleshooting.md +110 -0
- package/templates/vitepress/zh/repoctl/workflows.md +118 -0
- package/templates/vitepress/zh/thinking.md +88 -0
- package/templates/vitepress/zh/tools/changeset.md +75 -0
- package/templates/vitepress/zh/tools/husky.md +130 -0
- package/templates/vitepress/zh/tools/index.md +38 -0
- package/templates/vitepress/zh/tools/lint-staged.md +103 -0
- package/templates/vitepress/zh/tools/llms-txt.md +9 -0
- package/templates/vitepress/zh/tools/pnpm.md +127 -0
- package/templates/vitepress/zh/tools/renovate.md +91 -0
- package/templates/vitepress/zh/tools/turborepo.md +166 -0
- package/templates/vitepress/zh/why/assets/npm-dt.svg +15 -0
- package/templates/vitepress/zh/why/assets/npm-ts.svg +19 -0
- package/templates/vitepress/zh/why/examples/0.npm-basic-package/index.js +10 -0
- package/templates/vitepress/zh/why/examples/0.npm-basic-package/package.json +11 -0
- package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.cjs +12 -0
- package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.d.ts +1 -0
- package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.js +8 -0
- package/templates/vitepress/zh/why/examples/1.npm-basic-package/package.json +19 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/README.md +1 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/package-lock.json +30 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/package.json +35 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/rename-ext.js +24 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/src/index.ts +8 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.cjs.json +8 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.esm.json +7 -0
- package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.json +18 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/README.md +1 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/package-lock.json +1496 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/package.json +31 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/src/index.ts +8 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/tsconfig.json +16 -0
- package/templates/vitepress/zh/why/examples/3.npm-basic-package/tsdown.config.ts +16 -0
- package/templates/vitepress/zh/why/examples/usage-cjs/cjs.cjs +4 -0
- package/templates/vitepress/zh/why/examples/usage-cjs/esm.mjs +4 -0
- package/templates/vitepress/zh/why/examples/usage-cjs/index.js +8 -0
- package/templates/vitepress/zh/why/examples/usage-cjs/package-lock.json +36 -0
- package/templates/vitepress/zh/why/examples/usage-cjs/package.json +20 -0
- package/templates/vitepress/zh/why/examples/usage-esm/cjs.cjs +4 -0
- package/templates/vitepress/zh/why/examples/usage-esm/createRequire.js +7 -0
- package/templates/vitepress/zh/why/examples/usage-esm/esm.mjs +4 -0
- package/templates/vitepress/zh/why/examples/usage-esm/index.js +8 -0
- package/templates/vitepress/zh/why/examples/usage-esm/package-lock.json +36 -0
- package/templates/vitepress/zh/why/examples/usage-esm/package.json +21 -0
- package/templates/vitepress/zh/why/how-to-reuse-js-code.md +250 -0
- package/templates/vitepress/zh/why/index.md +1 -0
- package/templates/vitepress/zh/why/js-cjs-mjs.md +99 -0
- package/templates/vitepress/zh/why/js-keywords.md +132 -0
- package/templates/vitepress/zh/why/modern/bundlers.md +52 -0
- package/templates/vitepress/zh/why/modern/dts.md +93 -0
- package/templates/vitepress/zh/why/modern/esm-vs-cjs.md +84 -0
- package/templates/vitepress/zh/why/modern/index.md +55 -0
- package/templates/vitepress/zh/why/modern/package-entry-points.md +128 -0
- package/templates/vitepress/zh/why/modern/typescript.md +155 -0
- package/templates/vitepress/zh/why/publish-basic-npm-package.md +146 -0
- package/templates/vitepress/zh/why/what-is-npm-package.md +162 -0
- package/templates/vue-lib/package.json +12 -5
- package/templates/vitepress/en/index.md +0 -63
- package/templates/vitepress/en/knowledge/monorepo.md +0 -37
- package/templates/vitepress/en/repoctl/adopt-existing.md +0 -133
- package/templates/vitepress/en/repoctl/commands.md +0 -120
- package/templates/vitepress/en/repoctl/config.md +0 -69
- package/templates/vitepress/en/repoctl/getting-started.md +0 -116
- package/templates/vitepress/en/repoctl/index.md +0 -74
- package/templates/vitepress/en/repoctl/templates.md +0 -128
- package/templates/vitepress/en/repoctl/troubleshooting.md +0 -96
- package/templates/vitepress/en/repoctl/workflows.md +0 -89
|
@@ -3,208 +3,189 @@ import { defineConfig } from 'vitepress'
|
|
|
3
3
|
import llmstxt from 'vitepress-plugin-llms'
|
|
4
4
|
import { withMermaid } from 'vitepress-plugin-mermaid'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{ text: '配置文件', link: '/repoctl/config' },
|
|
19
|
-
{ text: '模板与创建', link: '/repoctl/templates' },
|
|
20
|
-
{ text: '模板资产治理', link: '/repoctl/template-assets' },
|
|
21
|
-
{ text: '工作流与 CI', link: '/repoctl/workflows' },
|
|
22
|
-
{ text: '报告与自动化输出', link: '/repoctl/reports' },
|
|
23
|
-
{ text: '排障与报告', link: '/repoctl/troubleshooting' },
|
|
24
|
-
{ text: '命令别名', link: '/repoctl/aliases' },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
]
|
|
6
|
+
interface SidebarLabels {
|
|
7
|
+
repoctl: string
|
|
8
|
+
repoctlItems: string[]
|
|
9
|
+
knowledge: string
|
|
10
|
+
knowledgeItems: string[]
|
|
11
|
+
packages: string
|
|
12
|
+
packageItems: string[]
|
|
13
|
+
ai: string
|
|
14
|
+
aiItems: string[]
|
|
15
|
+
tools: string
|
|
16
|
+
toolItems: string[]
|
|
17
|
+
}
|
|
28
18
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{ text: '如何复用 js 代码', link: '/why/how-to-reuse-js-code' },
|
|
46
|
-
{ text: 'JS 文件的各种后缀', link: '/why/js-cjs-mjs' },
|
|
47
|
-
{ text: 'CJS 和 ESM 关键字/全局变量对比', link: '/why/js-keywords' },
|
|
48
|
-
{ text: '什么是 npm 包', link: '/why/what-is-npm-package' },
|
|
49
|
-
{ text: '如何发布 npm 包', link: '/why/publish-basic-npm-package' },
|
|
50
|
-
{ text: '改进并发布现代 npm 包', link: '/why/index' },
|
|
51
|
-
{ text: '现代包指南', link: '/why/modern/' },
|
|
52
|
-
{ text: 'ESM 与 CJS', link: '/why/modern/esm-vs-cjs' },
|
|
53
|
-
{ text: '类型声明', link: '/why/modern/dts' },
|
|
54
|
-
{ text: '包入口', link: '/why/modern/package-entry-points' },
|
|
55
|
-
{ text: '构建工具', link: '/why/modern/bundlers' },
|
|
56
|
-
{ text: 'TypeScript', link: '/why/modern/typescript' },
|
|
57
|
-
],
|
|
58
|
-
},
|
|
19
|
+
const repoctlPaths = [
|
|
20
|
+
'',
|
|
21
|
+
'getting-started',
|
|
22
|
+
'adopt-existing',
|
|
23
|
+
'scenarios',
|
|
24
|
+
'execution-model',
|
|
25
|
+
'commands',
|
|
26
|
+
'checks',
|
|
27
|
+
'doctor',
|
|
28
|
+
'config',
|
|
29
|
+
'templates',
|
|
30
|
+
'template-assets',
|
|
31
|
+
'workflows',
|
|
32
|
+
'reports',
|
|
33
|
+
'troubleshooting',
|
|
34
|
+
'aliases',
|
|
59
35
|
]
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
36
|
+
const knowledgePaths = ['', 'manage', 'publish', 'commands', 'templates', 'troubleshooting']
|
|
37
|
+
const packagePaths = [
|
|
38
|
+
'how-to-reuse-js-code',
|
|
39
|
+
'js-cjs-mjs',
|
|
40
|
+
'js-keywords',
|
|
41
|
+
'what-is-npm-package',
|
|
42
|
+
'publish-basic-npm-package',
|
|
43
|
+
'index',
|
|
44
|
+
'modern/',
|
|
45
|
+
'modern/esm-vs-cjs',
|
|
46
|
+
'modern/dts',
|
|
47
|
+
'modern/package-entry-points',
|
|
48
|
+
'modern/bundlers',
|
|
49
|
+
'modern/typescript',
|
|
69
50
|
]
|
|
51
|
+
const aiPaths = ['', 'llms-txt']
|
|
52
|
+
const toolPaths = ['', 'pnpm', 'turborepo', 'changeset', 'husky', 'lint-staged', 'renovate', 'llms-txt']
|
|
70
53
|
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
]
|
|
54
|
+
const englishLabels: SidebarLabels = {
|
|
55
|
+
repoctl: 'repoctl',
|
|
56
|
+
repoctlItems: ['Overview', 'Getting Started', 'Adopt Existing Repos', 'Choose By Scenario', 'Execution Model', 'Command Reference', 'Verification', 'Doctor', 'Configuration', 'Templates', 'Template Assets', 'Workflows and CI', 'Reports', 'Troubleshooting', 'Command Aliases'],
|
|
57
|
+
knowledge: 'Knowledge Base',
|
|
58
|
+
knowledgeItems: ['Why Monorepo', 'Managing A Monorepo', 'Publishing and Changelogs', 'Monorepo Commands', 'Template Systems', 'Troubleshooting'],
|
|
59
|
+
packages: 'Modern Packages',
|
|
60
|
+
packageItems: ['Reusing JavaScript', 'Module Extensions', 'Runtime Globals', 'What Is An npm Package?', 'Publishing A Package', 'Package Evolution', 'Modern Package Guide', 'ESM vs CommonJS', 'Type Declarations', 'Package Entry Points', 'Bundlers', 'TypeScript'],
|
|
61
|
+
ai: 'AI',
|
|
62
|
+
aiItems: ['AI Documentation', 'llms.txt'],
|
|
63
|
+
tools: 'Tool Guides',
|
|
64
|
+
toolItems: ['Overview', 'pnpm', 'Turborepo', 'pnpm Versioning', 'Husky', 'lint-staged', 'Renovate', 'llms.txt'],
|
|
65
|
+
}
|
|
85
66
|
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
67
|
+
const chineseLabels: SidebarLabels = {
|
|
68
|
+
repoctl: 'repoctl',
|
|
69
|
+
repoctlItems: ['概览', '快速开始', '接入已有仓库', '按场景选命令', '执行模型', '命令速查', '校验链路', 'Doctor 诊断', '配置文件', '模板与创建', '模板资产治理', '工作流与 CI', '报告与自动化输出', '排障', '命令别名'],
|
|
70
|
+
knowledge: '知识库',
|
|
71
|
+
knowledgeItems: ['为什么使用 Monorepo', '管理 Monorepo', '发包与变更日志', 'Monorepo 命令', '模板体系', '常见问题排障'],
|
|
72
|
+
packages: '现代 npm 包',
|
|
73
|
+
packageItems: ['复用 JavaScript', '模块文件后缀', '运行时关键字', '什么是 npm 包', '发布 npm 包', '包的演进', '现代包指南', 'ESM 与 CommonJS', '类型声明', '包入口', '构建工具', 'TypeScript'],
|
|
74
|
+
ai: 'AI',
|
|
75
|
+
aiItems: ['AI 文档', 'llms.txt'],
|
|
76
|
+
tools: '工具专题',
|
|
77
|
+
toolItems: ['概览', 'pnpm', 'Turborepo', 'pnpm Versioning', 'Husky', 'lint-staged', 'Renovate', 'llms.txt'],
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function prefixed(prefix: string, section: string, paths: string[], labels: string[]) {
|
|
81
|
+
return paths.map((path, index) => ({
|
|
82
|
+
text: labels[index]!,
|
|
83
|
+
link: `${prefix}/${section}/${path}`.replace(/\/+/g, '/'),
|
|
84
|
+
}))
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function createSidebars(prefix: '' | '/zh', labels: SidebarLabels) {
|
|
88
|
+
const repoctl = [{ text: labels.repoctl, items: prefixed(prefix, 'repoctl', repoctlPaths, labels.repoctlItems) }]
|
|
89
|
+
const knowledge = [
|
|
90
|
+
{ text: labels.knowledge, items: prefixed(prefix, 'monorepo', knowledgePaths, labels.knowledgeItems) },
|
|
91
|
+
{ text: labels.packages, items: prefixed(prefix, 'why', packagePaths, labels.packageItems) },
|
|
92
|
+
]
|
|
93
|
+
const ai = [{ text: labels.ai, items: prefixed(prefix, 'ai', aiPaths, labels.aiItems) }]
|
|
94
|
+
const tools = [{ text: labels.tools, items: prefixed(prefix, 'tools', toolPaths, labels.toolItems) }]
|
|
95
|
+
return {
|
|
96
|
+
[`${prefix}/repoctl/`]: repoctl,
|
|
97
|
+
[`${prefix}/knowledge/`]: knowledge,
|
|
98
|
+
[`${prefix}/monorepo/`]: knowledge,
|
|
99
|
+
[`${prefix}/why/`]: knowledge,
|
|
100
|
+
[`${prefix}/ai/`]: ai,
|
|
101
|
+
[`${prefix}/tools/`]: tools,
|
|
102
|
+
[`${prefix || ''}/`]: repoctl,
|
|
103
|
+
}
|
|
104
|
+
}
|
|
109
105
|
|
|
110
106
|
export default withMermaid(defineConfig({
|
|
111
107
|
outDir: '.vitepress/dist',
|
|
112
108
|
title: 'repoctl',
|
|
113
|
-
description: '
|
|
109
|
+
description: 'Task-first CLI for initializing, maintaining, validating, and releasing pnpm and Turborepo monorepos.',
|
|
114
110
|
lastUpdated: true,
|
|
115
111
|
cleanUrls: true,
|
|
116
|
-
head: [
|
|
117
|
-
['link', { rel: 'icon', href: '/logo.jpg' }],
|
|
118
|
-
],
|
|
112
|
+
head: [['link', { rel: 'icon', href: '/logo.jpg' }]],
|
|
119
113
|
themeConfig: {
|
|
120
114
|
logo: '/logo.jpg',
|
|
121
|
-
search: {
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
socialLinks: [
|
|
125
|
-
{ icon: 'github', link: 'https://github.com/sonofmagic/monorepo-template' },
|
|
126
|
-
],
|
|
115
|
+
search: { provider: 'local' },
|
|
116
|
+
socialLinks: [{ icon: 'github', link: 'https://github.com/sonofmagic/repoctl' }],
|
|
127
117
|
},
|
|
128
118
|
locales: {
|
|
129
119
|
root: {
|
|
130
|
-
label: '
|
|
131
|
-
lang: '
|
|
120
|
+
label: 'English',
|
|
121
|
+
lang: 'en-US',
|
|
132
122
|
title: 'repoctl',
|
|
133
|
-
description: '
|
|
123
|
+
description: 'Task-first CLI for practical pnpm and Turborepo monorepos.',
|
|
134
124
|
themeConfig: {
|
|
135
125
|
nav: [
|
|
136
126
|
{ text: 'repoctl', link: '/repoctl/' },
|
|
137
|
-
{ text: '
|
|
138
|
-
{ text: '
|
|
139
|
-
{ text: '
|
|
140
|
-
{ text: 'AI
|
|
141
|
-
{ text: '
|
|
127
|
+
{ text: 'Getting Started', link: '/repoctl/getting-started' },
|
|
128
|
+
{ text: 'Commands', link: '/repoctl/commands' },
|
|
129
|
+
{ text: 'Knowledge Base', link: '/knowledge/' },
|
|
130
|
+
{ text: 'AI Docs', link: '/ai/' },
|
|
131
|
+
{ text: 'Tool Guides', link: '/tools/' },
|
|
142
132
|
],
|
|
143
|
-
outline: {
|
|
144
|
-
|
|
145
|
-
level: [2, 3],
|
|
146
|
-
},
|
|
147
|
-
sidebar: {
|
|
148
|
-
'/repoctl/': repoctlSidebar,
|
|
149
|
-
'/knowledge/': knowledgeSidebar,
|
|
150
|
-
'/monorepo/': knowledgeSidebar,
|
|
151
|
-
'/why/': knowledgeSidebar,
|
|
152
|
-
'/ai/': aiSidebar,
|
|
153
|
-
'/tools/': toolsSidebar,
|
|
154
|
-
'/': repoctlSidebar,
|
|
155
|
-
},
|
|
133
|
+
outline: { label: 'On This Page', level: [2, 3] },
|
|
134
|
+
sidebar: createSidebars('', englishLabels),
|
|
156
135
|
editLink: {
|
|
157
|
-
pattern: 'https://github.com/sonofmagic/
|
|
158
|
-
text: '
|
|
159
|
-
},
|
|
160
|
-
docFooter: {
|
|
161
|
-
prev: '上一页',
|
|
162
|
-
next: '下一页',
|
|
163
|
-
},
|
|
164
|
-
lastUpdated: {
|
|
165
|
-
text: '最后更新',
|
|
136
|
+
pattern: 'https://github.com/sonofmagic/repoctl/edit/main/templates/vitepress/:path',
|
|
137
|
+
text: 'Edit this page',
|
|
166
138
|
},
|
|
139
|
+
docFooter: { prev: 'Previous page', next: 'Next page' },
|
|
140
|
+
lastUpdated: { text: 'Last updated' },
|
|
167
141
|
},
|
|
168
142
|
},
|
|
169
|
-
|
|
170
|
-
label: '
|
|
171
|
-
lang: '
|
|
143
|
+
zh: {
|
|
144
|
+
label: '简体中文',
|
|
145
|
+
lang: 'zh-CN',
|
|
146
|
+
link: '/zh/',
|
|
172
147
|
title: 'repoctl',
|
|
173
|
-
description: '
|
|
148
|
+
description: '面向 pnpm 与 Turborepo monorepo 的任务型 CLI。',
|
|
174
149
|
themeConfig: {
|
|
175
150
|
nav: [
|
|
176
|
-
{ text: 'repoctl', link: '/
|
|
177
|
-
{ text: '
|
|
178
|
-
{ text: '
|
|
179
|
-
{ text: '
|
|
180
|
-
{ text: 'AI
|
|
151
|
+
{ text: 'repoctl', link: '/zh/repoctl/' },
|
|
152
|
+
{ text: '快速开始', link: '/zh/repoctl/getting-started' },
|
|
153
|
+
{ text: '命令', link: '/zh/repoctl/commands' },
|
|
154
|
+
{ text: '知识库', link: '/zh/knowledge/' },
|
|
155
|
+
{ text: 'AI 文档', link: '/zh/ai/' },
|
|
156
|
+
{ text: '工具专题', link: '/zh/tools/' },
|
|
181
157
|
],
|
|
182
|
-
outline: {
|
|
183
|
-
|
|
184
|
-
level: [2, 3],
|
|
185
|
-
},
|
|
186
|
-
sidebar: {
|
|
187
|
-
'/en/': enSidebar,
|
|
188
|
-
},
|
|
158
|
+
outline: { label: '目录', level: [2, 3] },
|
|
159
|
+
sidebar: createSidebars('/zh', chineseLabels),
|
|
189
160
|
editLink: {
|
|
190
|
-
pattern: 'https://github.com/sonofmagic/
|
|
191
|
-
text: '
|
|
192
|
-
},
|
|
193
|
-
docFooter: {
|
|
194
|
-
prev: 'Previous page',
|
|
195
|
-
next: 'Next page',
|
|
196
|
-
},
|
|
197
|
-
lastUpdated: {
|
|
198
|
-
text: 'Last updated',
|
|
161
|
+
pattern: 'https://github.com/sonofmagic/repoctl/edit/main/templates/vitepress/:path',
|
|
162
|
+
text: '为此页提供修改建议',
|
|
199
163
|
},
|
|
164
|
+
docFooter: { prev: '上一页', next: '下一页' },
|
|
165
|
+
lastUpdated: { text: '最后更新' },
|
|
200
166
|
},
|
|
201
167
|
},
|
|
202
168
|
},
|
|
203
169
|
vite: {
|
|
204
170
|
plugins: [
|
|
205
|
-
// @ts-ignore
|
|
171
|
+
// @ts-ignore vitepress-plugin-llms currently exposes Vite 6 plugin types.
|
|
206
172
|
Tailwindcss(),
|
|
207
|
-
llmstxt(
|
|
173
|
+
llmstxt({
|
|
174
|
+
title: 'repoctl',
|
|
175
|
+
description: 'Task-first CLI for pnpm and Turborepo monorepos. Simplified Chinese documentation is available under /zh/.',
|
|
176
|
+
domain: 'https://repo.icebreaker.top',
|
|
177
|
+
ignoreFiles: [
|
|
178
|
+
'zh/**',
|
|
179
|
+
'en/**',
|
|
180
|
+
'CHANGELOG.md',
|
|
181
|
+
'thinking.md',
|
|
182
|
+
'why/examples/**',
|
|
183
|
+
'.vitepress/**',
|
|
184
|
+
'**/node_modules/**',
|
|
185
|
+
'**/internal/**',
|
|
186
|
+
'**/fixtures/**',
|
|
187
|
+
],
|
|
188
|
+
}),
|
|
208
189
|
],
|
|
209
190
|
},
|
|
210
191
|
mermaid: {},
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
outline: deep
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# AI
|
|
5
|
+
# AI Documentation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
repoctl publishes AI-readable documentation alongside the human site.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Recommended Entrypoints
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| [llms.txt 说明](./llms-txt.md) | 维护约定、访问方式和页面 frontmatter 要求 |
|
|
11
|
+
- `/llms.txt`: compact English index and product summary.
|
|
12
|
+
- `/llms-full.txt`: combined page content when a larger context is appropriate.
|
|
13
|
+
- `/zh/`: Simplified Chinese documentation.
|
|
14
|
+
- [llms.txt Guide](./llms-txt.md): usage and maintenance rules.
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Using It In AI Tools
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Give the tool the public `llms.txt` URL first, then point it to the specific repoctl, knowledge, or tool page needed for the task. Prefer JSON CLI output when the tool needs stable structured fields.
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
先给 llms.txt
|
|
23
|
-
-> AI 选择相关页面
|
|
24
|
-
-> 必要时补充 llms-full.txt
|
|
25
|
-
```
|
|
20
|
+
## Maintenance
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| 维护动作 | 原因 |
|
|
30
|
-
| --------------------------------- | ---------------------------------------- |
|
|
31
|
-
| 新增重要页面时写 `description` | 让 llms 索引更容易被模型理解 |
|
|
32
|
-
| 页面标题保持具体 | 避免 AI 只看到泛化标题,无法判断页面用途 |
|
|
33
|
-
| repoctl、知识库、工具专题分开组织 | 让 AI 工具能按任务类型检索上下文 |
|
|
22
|
+
The index is generated by the site build. Changelogs, example fixture READMEs, generated output, and internal files are excluded so the result represents current product documentation.
|
|
@@ -1,42 +1,24 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
outline: deep
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# AI
|
|
5
|
+
# AI Entrypoint: llms.txt
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The documentation build generates `/llms.txt` and `/llms-full.txt`. English is the default corpus; Chinese pages are clearly namespaced under `/zh/`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Usage
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
| 页面 `.md` 文件 | 保留每个页面内容的 Markdown 版本 |
|
|
16
|
-
|
|
17
|
-
## 1. 使用方式
|
|
18
|
-
|
|
19
|
-
访问 `https://repo.icebreaker.top/llms.txt` 可以获取当前文档的 LLM 索引。如果需要一次性提供完整上下文,可以使用 `https://repo.icebreaker.top/llms-full.txt`。
|
|
20
|
-
|
|
21
|
-
当你在 Cursor、Claude Code、Codex 或其他 AI 编程工具里引用 repoctl 文档时,优先提供 `llms.txt`,再按需要补充具体页面链接。
|
|
22
|
-
|
|
23
|
-
## 2. 维护约定
|
|
11
|
+
```text
|
|
12
|
+
https://repo.icebreaker.top/llms.txt
|
|
13
|
+
https://repo.icebreaker.top/llms-full.txt
|
|
14
|
+
```
|
|
24
15
|
|
|
25
|
-
|
|
16
|
+
Use the compact index for discovery and the full file only when the consumer has enough context budget.
|
|
26
17
|
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
description: 说明这个页面解决的问题和适用场景。
|
|
30
|
-
---
|
|
31
|
-
```
|
|
18
|
+
## Scope
|
|
32
19
|
|
|
33
|
-
|
|
20
|
+
The generated index includes current product guides, package roles, commands, reports, template assets, knowledge pages, and tool topics. Historical changelogs, example fixture READMEs, generated build output, and internal maintenance files are excluded.
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
## Language
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
| -------------------------------------- | ------------------------------------ |
|
|
39
|
-
| repoctl 命令、校验、诊断、报告 | `/repoctl/` |
|
|
40
|
-
| monorepo 和 npm 包基础知识 | `/knowledge/`、`/monorepo/`、`/why/` |
|
|
41
|
-
| pnpm、Turborepo、versioning 等工具专题 | `/tools/` |
|
|
42
|
-
| llms.txt 和 AI 工具读取约定 | `/ai/` |
|
|
24
|
+
English URLs use the site root. Simplified Chinese pages use `/zh/`; this mirrors the CLI default and `--lang zh-CN` opt-in behavior.
|
|
@@ -1,40 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Getting Started
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- [repoctl 快速开始](./repoctl/getting-started.md)
|
|
6
|
-
- [repoctl 命令速查](./repoctl/commands.md)
|
|
7
|
-
- [repoctl 配置文件](./repoctl/config.md)
|
|
8
|
-
|
|
9
|
-
## 先这样用
|
|
3
|
+
The current setup guide is [repoctl Getting Started](./repoctl/getting-started.md).
|
|
10
4
|
|
|
11
5
|
```bash
|
|
12
6
|
pnpm add -D repoctl
|
|
13
7
|
pnpm exec repo init
|
|
14
8
|
pnpm exec repo doctor
|
|
15
|
-
pnpm exec repo new
|
|
16
|
-
pnpm exec repo check
|
|
17
9
|
```
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm run repo:init
|
|
23
|
-
pnpm doctor
|
|
24
|
-
pnpm new
|
|
25
|
-
pnpm check
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 知识点保留
|
|
29
|
-
|
|
30
|
-
理解工具前,先理解这几个边界:
|
|
31
|
-
|
|
32
|
-
| 命令 | 解决的问题 |
|
|
33
|
-
| -------------- | ----------------------------------------------------- |
|
|
34
|
-
| `repo init` | 补齐仓库默认脚本、workspace patterns 和基础工具链入口 |
|
|
35
|
-
| `repo doctor` | 判断仓库当前是否可用,并输出可保存的诊断报告 |
|
|
36
|
-
| `repo new` | 从内置模板创建包、应用、服务、文档站或 CLI |
|
|
37
|
-
| `repo check` | 预览或执行提交前推荐校验 |
|
|
38
|
-
| `repo upgrade` | 同步模板最新标准资产 |
|
|
39
|
-
|
|
40
|
-
如果你是在学习 monorepo 的基础概念,可以继续看 [为什么往 monorepo 方向演进](./monorepo/index.md)。
|
|
11
|
+
Use [Adopt Existing Repositories](./repoctl/adopt-existing.md) when introducing repoctl to an established workspace.
|
|
@@ -3,34 +3,34 @@ layout: home
|
|
|
3
3
|
|
|
4
4
|
hero:
|
|
5
5
|
name: repoctl
|
|
6
|
-
text:
|
|
7
|
-
tagline:
|
|
6
|
+
text: Short, stable workflows for pnpm monorepos
|
|
7
|
+
tagline: Initialize, diagnose, scaffold, verify, and upgrade practical Turborepo workspaces from one CLI.
|
|
8
8
|
image:
|
|
9
9
|
src: /logo.jpg
|
|
10
10
|
alt: repoctl logo
|
|
11
11
|
actions:
|
|
12
12
|
- theme: brand
|
|
13
|
-
text:
|
|
13
|
+
text: Get Started
|
|
14
14
|
link: /repoctl/getting-started
|
|
15
15
|
- theme: alt
|
|
16
|
-
text:
|
|
16
|
+
text: Commands
|
|
17
17
|
link: /repoctl/commands
|
|
18
18
|
- theme: alt
|
|
19
|
-
text: AI
|
|
19
|
+
text: AI Docs
|
|
20
20
|
link: /ai/
|
|
21
21
|
|
|
22
22
|
features:
|
|
23
|
-
- title:
|
|
24
|
-
details:
|
|
25
|
-
- title:
|
|
26
|
-
details:
|
|
27
|
-
- title:
|
|
28
|
-
details:
|
|
29
|
-
- title:
|
|
30
|
-
details:
|
|
23
|
+
- title: Adopt existing workspaces
|
|
24
|
+
details: Run setup and doctor to align workspace patterns, root scripts, config files, and commit hooks.
|
|
25
|
+
- title: Create packages and apps
|
|
26
|
+
details: Scaffold libraries, apps, services, docs, and CLIs with interactive prompts or explicit template keys.
|
|
27
|
+
- title: Make checks repeatable
|
|
28
|
+
details: Preview and run local verification plans that match your lint, typecheck, build, test, and tsd workflow.
|
|
29
|
+
- title: AI-readable documentation
|
|
30
|
+
details: Generate llms.txt, llms-full.txt, and Markdown page output so AI coding tools can read the repoctl docs directly.
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Fast Path
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
pnpm add -D repoctl
|
|
@@ -40,7 +40,7 @@ pnpm exec repo new
|
|
|
40
40
|
pnpm exec repo check
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Generated repositories expose the same workflow as shorter root scripts:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
pnpm run repo:init
|
|
@@ -49,18 +49,15 @@ pnpm run repo:new
|
|
|
49
49
|
pnpm run repo:check
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
##
|
|
53
|
-
|
|
54
|
-
- [repoctl
|
|
55
|
-
- [
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
- [
|
|
60
|
-
- [
|
|
61
|
-
- [
|
|
62
|
-
- [
|
|
63
|
-
- [
|
|
64
|
-
- [模板资产治理](./repoctl/template-assets.md)
|
|
65
|
-
- [工作流与 CI](./repoctl/workflows.md)
|
|
66
|
-
- [报告与自动化输出](./repoctl/reports.md)
|
|
52
|
+
## Keep Reading
|
|
53
|
+
|
|
54
|
+
- [repoctl Overview](./repoctl/index.md)
|
|
55
|
+
- [Getting Started](./repoctl/getting-started.md)
|
|
56
|
+
- [Adopt Existing Repositories](./repoctl/adopt-existing.md)
|
|
57
|
+
- [Choose By Scenario](./repoctl/scenarios.md)
|
|
58
|
+
- [Command Reference](./repoctl/commands.md)
|
|
59
|
+
- [Configuration](./repoctl/config.md)
|
|
60
|
+
- [Templates](./repoctl/templates.md)
|
|
61
|
+
- [Workflows and CI](./repoctl/workflows.md)
|
|
62
|
+
- [AI Docs: llms.txt](./ai/llms-txt.md)
|
|
63
|
+
- [Knowledge Base](./knowledge/index.md)
|