@icebreakers/monorepo-templates 1.3.5 → 2.0.1

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.
Files changed (51) hide show
  1. package/assets/.agents/skills/repoctl/SKILL.md +63 -0
  2. package/assets/.agents/skills/repoctl/references/commands.md +243 -0
  3. package/assets/.agents/skills/repoctl/references/config.md +67 -0
  4. package/assets/.agents/skills/repoctl/references/templates.md +46 -0
  5. package/assets/.github/workflows/ci.yml +1 -1
  6. package/assets/.github/workflows/release.yml +7 -0
  7. package/assets/AGENTS.md +31 -42
  8. package/assets/CLAUDE.md +14 -0
  9. package/assets/package.json +9 -49
  10. package/assets/pnpm-workspace.yaml +5 -5
  11. package/assets-data.mjs +2 -0
  12. package/dist/cli.mjs +1 -1
  13. package/dist/index.mjs +1 -1
  14. package/dist/{prepare-DlR-vvls.mjs → prepare-zIcRa4-K.mjs} +27 -6
  15. package/package.json +6 -4
  16. package/templates/cli/dev/index.ts +4 -2
  17. package/templates/cli/package.json +4 -1
  18. package/templates/client/package.json +19 -14
  19. package/templates/server/package.json +7 -4
  20. package/templates/server/src/node-entry.ts +2 -2
  21. package/templates/server/tsconfig.json +2 -1
  22. package/templates/tsdown/package.json +5 -2
  23. package/templates/vitepress/.vitepress/config.ts +1 -0
  24. package/templates/vitepress/.vitepress/seo.ts +12 -0
  25. package/templates/vitepress/.vitepress/theme/components/HomePage.vue +25 -0
  26. package/templates/vitepress/ai/create.md +45 -0
  27. package/templates/vitepress/ai/index.md +13 -0
  28. package/templates/vitepress/index.md +1 -1
  29. package/templates/vitepress/learn/tools/repoctl-vs-pnpm-turborepo.md +16 -0
  30. package/templates/vitepress/package.json +9 -6
  31. package/templates/vitepress/public/robots.txt +5 -0
  32. package/templates/vitepress/scripts/check-locales.ts +2 -2
  33. package/templates/vitepress/start/index.md +3 -1
  34. package/templates/vitepress/start/install-repoctl.md +16 -0
  35. package/templates/vitepress/start/install.md +1 -1
  36. package/templates/vitepress/start/what-is-repoctl.md +18 -0
  37. package/templates/vitepress/tasks/adopt-existing.md +1 -1
  38. package/templates/vitepress/tsconfig.json +1 -0
  39. package/templates/vitepress/zh/ai/create.md +45 -0
  40. package/templates/vitepress/zh/ai/index.md +1 -0
  41. package/templates/vitepress/zh/index.md +1 -1
  42. package/templates/vitepress/zh/learn/tools/repoctl-vs-pnpm-turborepo.md +16 -0
  43. package/templates/vitepress/zh/start/index.md +3 -1
  44. package/templates/vitepress/zh/start/install-repoctl.md +16 -0
  45. package/templates/vitepress/zh/start/install.md +1 -1
  46. package/templates/vitepress/zh/start/what-is-repoctl.md +16 -0
  47. package/templates/vitepress/zh/tasks/adopt-existing.md +1 -1
  48. package/templates/vue-lib/package.json +9 -6
  49. package/templates/vue-lib/tsconfig.node.json +1 -1
  50. package/templates/vue-lib/vite.config.ts +2 -2
  51. package/templates/vue-lib/vite.shared.config.ts +2 -2
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: 给 AI 代理用的非交互配方:pnpm create repoctl --yes 创建 repoctl 工作区。
3
+ outline: deep
4
+ ---
5
+
6
+ # 用 repoctl 创建项目(AI)
7
+
8
+ 当代理被要求用 repoctl 创建新项目时,按本页执行。
9
+
10
+ ## 空目录
11
+
12
+ 不要提问。直接运行:
13
+
14
+ ```bash
15
+ pnpm create repoctl <dir> -- --yes --templates <keys>
16
+ cd <dir>
17
+ pnpm install
18
+ pnpm exec repo init
19
+ pnpm exec repo doctor
20
+ ```
21
+
22
+ 等价命令:`npm create repoctl@latest <dir> -- --yes --templates <keys>` 与
23
+ `npx create-repoctl <dir> --yes --templates <keys>`。
24
+ `pnpm create` / `npm create` 的 flag 前必须加 `--`。
25
+
26
+ ## 模板 key
27
+
28
+ | 用户意图 | `--templates` / `repo new --template` |
29
+ | ------------------- | ------------------------------------- |
30
+ | Vue / 全栈 Web | `vue-hono` |
31
+ | API / Hono 服务 | `hono-server` |
32
+ | TypeScript 库 / SDK | `tsdown` |
33
+ | Vue 组件库 | `vue-lib` |
34
+ | 文档站 | `vitepress` |
35
+ | CLI | `cli` |
36
+
37
+ 意图不清时省略 `--templates`。初始化后再:
38
+
39
+ ```bash
40
+ pnpm exec repo new <name> --template <key>
41
+ ```
42
+
43
+ ## 已有工作区
44
+
45
+ 若已有 `pnpm-workspace.yaml` 和 `repoctl` 依赖,不要再跑 create。改用 `repo new`,然后 `pnpm exec repo check`。
@@ -12,6 +12,7 @@ AI 文档入口用于给 Cursor、Claude Code、Codex 和其他 AI 编程工具
12
12
  | ------------------------------ | ------------------------------------------------ |
13
13
  | `/llms.txt` | 轻量文档索引,适合先交给 AI 工具判断要读哪些页面 |
14
14
  | `/llms-full.txt` | 合并后的完整文档,适合需要一次性提供上下文的场景 |
15
+ | [创建项目](./create.md) | 非交互 `pnpm create repoctl --yes` 配方 |
15
16
  | [llms.txt 说明](./llms-txt.md) | 维护约定、访问方式和页面 frontmatter 要求 |
16
17
 
17
18
  ## 2. 在 AI 工具里怎么用
@@ -2,7 +2,7 @@
2
2
  layout: page
3
3
  aside: false
4
4
  pageClass: repoctl-home-page
5
- title: repoctl
5
+ title: repoctl 官方 Monorepo CLI
6
6
  description: 面向 pnpm 与 Turborepo monorepo 的任务型 CLI。
7
7
  ---
8
8
 
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: repoctl、pnpm 与 Turborepo
3
+ description: 了解 repoctl 如何与 pnpm、Turborepo 组合,构成现代 monorepo 工具链。
4
+ ---
5
+
6
+ # repoctl、pnpm 与 Turborepo
7
+
8
+ pnpm 负责包和依赖,Turborepo 负责任务编排与缓存,repoctl 负责仓库流程、约定、诊断、模板、校验、报告和发布步骤。
9
+
10
+ | 工具 | 主要职责 |
11
+ | --------- | ---------------------- |
12
+ | pnpm | workspace 包与依赖管理 |
13
+ | Turborepo | 任务流水线与缓存 |
14
+ | repoctl | 仓库操作与引导式校验 |
15
+
16
+ 阅读[什么是 repoctl](/zh/start/what-is-repoctl)或[安装 repoctl](/zh/start/install-repoctl)。
@@ -5,6 +5,8 @@
5
5
  ## 选择第一次操作
6
6
 
7
7
  - 如果还没有运行过命令,阅读[安装并初始化](./install.md)。
8
+ - 阅读[什么是 repoctl?](./what-is-repoctl.md)了解产品定位。
9
+ - 阅读[安装 repoctl](./install-repoctl.md)快速完成设置。
8
10
  - 如果已经安装 repoctl,直接[运行第一次诊断](./diagnose.md)。
9
11
  - 得到诊断结果后,进入[选择下一项任务](./choose-next.md)。
10
12
 
@@ -23,4 +25,4 @@ CLI 支持 pnpm workspace,并能理解 Turborepo 任务图,但不会替代
23
25
 
24
26
  ## 开始前确认
25
27
 
26
- 你需要 Node.js 22.12 或更新版本,并确保 pnpm 在 PATH 中。从仓库根目录执行命令,这样 repoctl 才能读取 workspace 配置。
28
+ 你需要 Node.js 22.13 或更新版本,并确保 pnpm 在 PATH 中。从仓库根目录执行命令,这样 repoctl 才能读取 workspace 配置。
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: 安装 repoctl
3
+ description: 在 pnpm monorepo 中安装 repoctl,初始化受管默认值并运行第一次仓库诊断。
4
+ ---
5
+
6
+ # 安装 repoctl
7
+
8
+ 把 repoctl 安装为开发依赖,让成员和 CI 使用同一个版本。
9
+
10
+ ```bash
11
+ pnpm add -D repoctl
12
+ pnpm exec repo init
13
+ pnpm exec repo doctor
14
+ ```
15
+
16
+ 接着阅读[运行校验](/zh/tasks/checks)或[接入已有 workspace](/zh/tasks/adopt-existing)。
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 准备环境
6
6
 
7
- - Node.js 20 或更高版本。
7
+ - Node.js 22.13 或更高版本。
8
8
  - pnpm。推荐通过 Corepack 启用:`corepack enable`。
9
9
  - Git。`repo doctor` 会读取仓库信息,用来补全 package metadata 和诊断提交链路。
10
10
 
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: 什么是 repoctl?
3
+ description: repoctl 是面向 pnpm 与 Turborepo monorepo 的官方任务型 CLI,用于初始化、诊断和维护仓库。
4
+ ---
5
+
6
+ # 什么是 repoctl?
7
+
8
+ repoctl 把仓库约定变成可重复执行的初始化、诊断、创建、校验、报告和发布命令。
9
+
10
+ ```bash
11
+ pnpm add -D repoctl
12
+ pnpm exec repo init
13
+ pnpm exec repo doctor
14
+ ```
15
+
16
+ 继续阅读[安装 repoctl](/zh/start/install-repoctl)或[命令速查](/zh/reference/commands)。
@@ -8,7 +8,7 @@
8
8
 
9
9
  - 在 workspace 根目录执行命令。
10
10
  - 提交或暂存与本次接入无关的本地改动。
11
- - 确认 Node.js 22.12 或更新版本以及 pnpm 可用。
11
+ - 确认 Node.js 22.13 或更新版本以及 pnpm 可用。
12
12
 
13
13
  ## 最小命令
14
14
 
@@ -5,7 +5,7 @@
5
5
  "private": true,
6
6
  "description": "Internal Vue library template shipped with repoctl",
7
7
  "author": "ice breaker <hi@sonofmagic.top>",
8
- "license": "ISC",
8
+ "license": "MIT",
9
9
  "homepage": "https://repoctl.icebreaker.top",
10
10
  "repository": {
11
11
  "type": "git",
@@ -32,6 +32,9 @@
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
+ "engines": {
36
+ "node": ">=22.13.0"
37
+ },
35
38
  "scripts": {
36
39
  "build": "vue-tsc -b && vite build",
37
40
  "test": "vitest run",
@@ -56,13 +59,13 @@
56
59
  "types": "./dist/index.d.ts"
57
60
  },
58
61
  "devDependencies": {
59
- "@vitejs/plugin-vue": "^6.0.8",
60
- "@vue/test-utils": "^2.5.0",
62
+ "@vitejs/plugin-vue": "^6.0.9",
63
+ "@vue/test-utils": "^2.5.1",
61
64
  "@vue/tsconfig": "^0.9.1",
62
- "jsdom": "^30.0.1",
63
- "vite": "^8.2.2",
65
+ "jsdom": "^30.1.0",
66
+ "vite": "^8.3.0",
64
67
  "vite-plugin-dts": "^5.1.0",
65
- "vue": "^3.5.42",
68
+ "vue": "^3.5.43",
66
69
  "vue-tsc": "^3.3.11"
67
70
  }
68
71
  }
@@ -21,5 +21,5 @@
21
21
  "skipLibCheck": true,
22
22
  "noUncheckedSideEffectImports": true
23
23
  },
24
- "include": ["vite.config.ts"]
24
+ "include": ["vite.config.ts", "vite.shared.config.ts"]
25
25
  }
@@ -1,8 +1,8 @@
1
+ import path from 'node:path'
1
2
  import Vue from '@vitejs/plugin-vue'
2
- import path from 'pathe'
3
3
  import { mergeConfig } from 'vite'
4
4
  import DTS from 'vite-plugin-dts'
5
- import { sharedConfig } from './vite.shared.config'
5
+ import { sharedConfig } from './vite.shared.config.ts'
6
6
 
7
7
  export default mergeConfig(sharedConfig, {
8
8
  plugins: [
@@ -1,7 +1,7 @@
1
- import path from 'pathe'
1
+ import path from 'node:path'
2
+ import { defineConfig } from 'vite'
2
3
 
3
4
  // https://vite.dev/guide/build.html#library-mode
4
- import { defineConfig } from 'vite'
5
5
 
6
6
  export const sharedConfig = defineConfig({
7
7
  resolve: {