@collectui/cli 0.2.39 → 0.2.40
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/package.json +1 -1
- package/src/commands/setup.mjs +4 -2
package/package.json
CHANGED
package/src/commands/setup.mjs
CHANGED
|
@@ -100,7 +100,9 @@ export async function runSetup({ flags, rest = [], reporter, mode }) {
|
|
|
100
100
|
const target = resolveTarget({ flags, rest, mode });
|
|
101
101
|
let hasComponents = existsSync(join(target, "components.json"));
|
|
102
102
|
const nonEmpty = isNonEmptyDir(target);
|
|
103
|
-
|
|
103
|
+
// 模板不给 = 走官方命令链(账户 cli-init-command > 内置默认)——旧默认 "vite"
|
|
104
|
+
// 会让 officialScaffold 恒假、命令链永不触发(2026-12-07 用户实锤)
|
|
105
|
+
const template = flags.template ? String(flags.template) : null;
|
|
104
106
|
|
|
105
107
|
if (mode === "configure" && !hasComponents) {
|
|
106
108
|
throw new CliError(`${displayPath(target)} has no components.json.`, {
|
|
@@ -204,7 +206,7 @@ export async function runSetup({ flags, rest = [], reporter, mode }) {
|
|
|
204
206
|
hasComponents = existsSync(join(target, "components.json"));
|
|
205
207
|
} else {
|
|
206
208
|
reporter.step(1, 5, `Scaffold ${template} project in ${displayPath(target)}`);
|
|
207
|
-
planScaffold(cs, { target, name: projectName, template, pm, install });
|
|
209
|
+
planScaffold(cs, { target, name: projectName, template: "vite", pm, install });
|
|
208
210
|
}
|
|
209
211
|
} else {
|
|
210
212
|
reporter.step(1, 5, `Use existing project ${displayPath(target)}`);
|