mvframe 1.0.81 → 1.0.82
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.cn.md +2 -0
- package/README.md +2 -0
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/vendor.js +1920 -1743
- package/package.json +1 -1
- package/scripts/install-codex-agents.js +0 -0
- package/scripts/scaffold-app.js +9 -7
package/package.json
CHANGED
|
File without changes
|
package/scripts/scaffold-app.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
* 在目标工程生成 MVFrame 推荐目录与雏形文件(views / component / api / pinia / router / config / assets)。
|
|
4
4
|
*
|
|
5
5
|
* 用法:
|
|
6
|
-
* node path/to/mvframe/scripts/scaffold-app.js [项目根] [--force]
|
|
6
|
+
* node path/to/mvframe/scripts/scaffold-app.js [项目根] [--force|-f]
|
|
7
7
|
* yarn exec mvframe-init-app
|
|
8
8
|
*
|
|
9
9
|
* 环境变量:MVFRAME_SCAFFOLD_TARGET=/path/to/project
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* 选项:
|
|
12
|
+
* --force, -f 覆盖已存在的脚手架文件
|
|
13
|
+
* --no-package-json, -n 不读不写 package.json(仅生成源码与 Vite 配置)
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
const fs = require("fs");
|
|
@@ -16,10 +18,10 @@ const path = require("path");
|
|
|
16
18
|
const { execFileSync } = require("child_process");
|
|
17
19
|
const { upsertCodexAgents } = require("./install-codex-agents.js");
|
|
18
20
|
|
|
19
|
-
const FORCE = process.argv.includes("--force");
|
|
20
|
-
const NO_PKG = process.argv.includes("--no-package-json");
|
|
21
|
+
const FORCE = process.argv.includes("--force") || process.argv.includes("-f");
|
|
22
|
+
const NO_PKG = process.argv.includes("--no-package-json") || process.argv.includes("-n");
|
|
21
23
|
const argPath = process.argv.find(
|
|
22
|
-
(a, i) => i >= 2 &&
|
|
24
|
+
(a, i) => i >= 2 && !a.startsWith("-"),
|
|
23
25
|
);
|
|
24
26
|
const target = path.resolve(
|
|
25
27
|
process.env.MVFRAME_SCAFFOLD_TARGET || argPath || process.cwd(),
|
|
@@ -831,7 +833,7 @@ yarn dev
|
|
|
831
833
|
yarn exec mvframe-d
|
|
832
834
|
\`\`\`
|
|
833
835
|
|
|
834
|
-
若需跳过对 \`package.json\` 的修改:\`node scripts/scaffold-app.js --no-package-json\`。
|
|
836
|
+
若需跳过对 \`package.json\` 的修改:\`node scripts/scaffold-app.js --no-package-json\` 或 \`node scripts/scaffold-app.js -n\`。
|
|
835
837
|
|
|
836
838
|
自动生成的 \`vite.config.js\` 已包含 \`unplugin-auto-import\`;\`dts: true\` 时类型默认写在项目根 \`auto-imports.d.ts\`。
|
|
837
839
|
|
|
@@ -934,7 +936,7 @@ yarn exec mvframe-install-codex-rules
|
|
|
934
936
|
|
|
935
937
|
## Cursor 规则(\`.cursor/rules\`)
|
|
936
938
|
|
|
937
|
-
初始化脚本会把 **mvframe 包内**与仓库一致的 **\`*.mdc\`** 写入目标项目 **\`/.cursor/rules/\`**(\`component-hierarchy\`、\`script-setup\`、\`style-system\`、\`views\`、\`router\`、\`global-components\`、\`data\`、\`util\`)。若目录或文件已存在且未加 \`--force\`,则跳过对应文件。
|
|
939
|
+
初始化脚本会把 **mvframe 包内**与仓库一致的 **\`*.mdc\`** 写入目标项目 **\`/.cursor/rules/\`**(\`component-hierarchy\`、\`script-setup\`、\`style-system\`、\`views\`、\`router\`、\`global-components\`、\`data\`、\`util\`)。若目录或文件已存在且未加 \`--force\` / \`-f\`,则跳过对应文件。
|
|
938
940
|
|
|
939
941
|
npm 包需在 \`files\` 中包含 \`.cursor/rules\`;使用本地 \`file:\` / 源码链接时同样可用。
|
|
940
942
|
|