create-repoctl 1.0.2 → 1.0.4

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 CHANGED
@@ -6,22 +6,23 @@ The recommended create command for starting a repoctl-managed pnpm and Turborepo
6
6
 
7
7
  ```bash
8
8
  npm create repoctl@latest
9
- pnpm create repoctl
10
- yarn create repoctl
9
+ pnpm create repoctl@latest
10
+ yarn create repoctl@latest
11
11
  ```
12
12
 
13
13
  The interactive flow selects a target directory and any built-in templates to include. After creation, or for agents that must not prompt:
14
14
 
15
15
  ```bash
16
- pnpm create repoctl my-app -- --yes --templates vue-hono
16
+ pnpm create repoctl@latest my-app -- --yes --templates vue-hono
17
17
  npm create repoctl@latest my-app -- --yes --templates vue-hono
18
- npx create-repoctl my-app --yes --templates vue-hono
18
+ npx create-repoctl@latest my-app --yes --templates vue-hono
19
19
  ```
20
20
 
21
21
  Template keys: `vue-hono`, `hono-server`, `tsdown`, `vue-lib`, `vitepress`, `cli`. After creation:
22
22
 
23
23
  ```bash
24
24
  cd <project>
25
+ corepack enable
25
26
  pnpm install
26
27
  pnpm exec repo init
27
28
  pnpm exec repo doctor
@@ -30,12 +31,15 @@ pnpm exec repo check
30
31
 
31
32
  ## For AI agents
32
33
 
33
- If the user asked you to create a project with repoctl, run the `--yes` command above, then `pnpm install`, `pnpm exec repo init`, and `pnpm exec repo doctor`. Do not wait for interactive prompts.
34
+ Run the command from a new or empty directory outside the repoctl source
35
+ checkout. If the user asked you to create a project with repoctl, run the
36
+ `--yes` command above, then `corepack enable`, `pnpm install`, `pnpm exec repo
37
+ init`, and `pnpm exec repo doctor`. Do not wait for interactive prompts.
34
38
 
35
39
  Output is English by default. Pass `--lang zh-CN` or set `REPOCTL_LANG=zh-CN` for Simplified Chinese.
36
40
 
37
41
  ```bash
38
- pnpm create repoctl -- --lang zh-CN
42
+ pnpm create repoctl@latest -- --lang zh-CN
39
43
  ```
40
44
 
41
45
  ## Project links
package/README.zh-CN.md CHANGED
@@ -6,29 +6,30 @@
6
6
 
7
7
  ```bash
8
8
  npm create repoctl@latest
9
- pnpm create repoctl
10
- yarn create repoctl
9
+ pnpm create repoctl@latest
10
+ yarn create repoctl@latest
11
11
  ```
12
12
 
13
13
  交互流程会选择目标目录和需要包含的内置模板。代理或不需要提问时:
14
14
 
15
15
  ```bash
16
- pnpm create repoctl my-app -- --yes --templates vue-hono
16
+ pnpm create repoctl@latest my-app -- --yes --templates vue-hono
17
17
  npm create repoctl@latest my-app -- --yes --templates vue-hono
18
- npx create-repoctl my-app --yes --templates vue-hono
18
+ npx create-repoctl@latest my-app --yes --templates vue-hono
19
19
  ```
20
20
 
21
21
  模板 key:`vue-hono`、`hono-server`、`tsdown`、`vue-lib`、`vitepress`、`cli`。创建完成后运行:
22
22
 
23
23
  ```bash
24
24
  cd <project>
25
+ corepack enable
25
26
  pnpm install
26
27
  pnpm exec repo init
27
28
  pnpm exec repo doctor
28
29
  pnpm exec repo check
29
30
  ```
30
31
 
31
- 默认输出英文。传入 `--lang zh-CN` 或设置 `REPOCTL_LANG=zh-CN` 可切换为简体中文。
32
+ 请在 repoctl 源仓库之外的新目录或空目录中运行。默认输出英文。传入 `--lang zh-CN` 或设置 `REPOCTL_LANG=zh-CN` 可切换为简体中文。
32
33
 
33
34
  ## 项目链接
34
35
 
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createCreateRepoctlProgram } from "./src-C3obqm4D.mjs";
1
+ import { t as createCreateRepoctlProgram } from "./src-_yG_zk56.mjs";
2
2
  import process from "node:process";
3
3
  //#region src/cli.ts
4
4
  createCreateRepoctlProgram().parseAsync(process.argv).catch((error) => {
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as resolveCreateRepoctlLocale, t as createCreateRepoctlProgram } from "./src-C3obqm4D.mjs";
1
+ import { n as resolveCreateRepoctlLocale, t as createCreateRepoctlProgram } from "./src-_yG_zk56.mjs";
2
2
  export { createCreateRepoctlProgram, resolveCreateRepoctlLocale };
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import process from "node:process";
3
- import { Command, checkbox, input, scaffoldWorkspace, templateChoices } from "@icebreakers/monorepo-templates";
3
+ import { Command, checkbox, getWorkspacePackageManager, input, scaffoldWorkspace, templateChoices } from "@icebreakers/monorepo-templates";
4
4
  import fs from "node:fs/promises";
5
5
  //#region src/i18n/locales/en/error.ts
6
6
  const error$1 = {
@@ -144,6 +144,7 @@ function formatNextSteps(targetDir, cwd = process.cwd(), heading = "Workspace cr
144
144
  "",
145
145
  heading,
146
146
  ` cd ${path.relative(cwd, targetDir) || "."}`,
147
+ " corepack enable",
147
148
  " pnpm install",
148
149
  " pnpm exec repo init",
149
150
  " pnpm exec repo doctor",
@@ -161,10 +162,11 @@ async function updateRootPackageJson(targetDir, projectName) {
161
162
  const raw = await fs.readFile(pkgPath, "utf8");
162
163
  const pkg = JSON.parse(raw);
163
164
  pkg.name = projectName;
164
- const devDependencies = pkg.devDependencies;
165
- if (devDependencies && devDependencies[legacyToolPackageName]) delete devDependencies[legacyToolPackageName];
166
- if (devDependencies && devDependencies[repoctlPackageName]?.startsWith("workspace:")) devDependencies[repoctlPackageName] = publishedRepoctlVersion;
167
- if (devDependencies && Object.keys(devDependencies).length === 0) delete pkg.devDependencies;
165
+ pkg.packageManager = await getWorkspacePackageManager();
166
+ const devDependencies = pkg.devDependencies ?? {};
167
+ delete devDependencies[legacyToolPackageName];
168
+ devDependencies[repoctlPackageName] = publishedRepoctlVersion;
169
+ pkg.devDependencies = devDependencies;
168
170
  const scripts = pkg.scripts;
169
171
  if (scripts) {
170
172
  const nextScripts = {};
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "create-repoctl",
3
3
  "type": "module",
4
- "version": "1.0.2",
5
- "description": "Create a repoctl-managed pnpm and Turborepo workspace. Non-interactive: pnpm create repoctl <dir> -- --yes --templates vue-hono",
4
+ "version": "1.0.4",
5
+ "description": "Create a repoctl-managed pnpm and Turborepo workspace. Non-interactive: pnpm create repoctl@latest <dir> -- --yes --templates vue-hono",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://repoctl.icebreaker.top",
@@ -44,7 +44,7 @@
44
44
  "node": ">=22.13.0"
45
45
  },
46
46
  "dependencies": {
47
- "@icebreakers/monorepo-templates": "2.0.2"
47
+ "@icebreakers/monorepo-templates": "2.0.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "tsd": "^0.33.0"