We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff317bc commit 9662ef4Copy full SHA for 9662ef4
package.json
@@ -14,7 +14,7 @@
14
"node": ">= 18"
15
},
16
"scripts": {
17
- "pnpm:devPreinstall": "pnpm run init",
+ "pnpm:devPreinstall": "node script/pnpm-dev-preinstall.js",
18
"postinstall": "husky install && pnpm -C internal/utils prebuild",
19
"init": "git submodule init && git submodule update",
20
"start": "pnpm dev",
script/pnpm-dev-preinstall.js
@@ -0,0 +1,15 @@
1
+const child_process = require('child_process');
2
+
3
+function initSubmodule() {
4
+ if (process.env.CI) {
5
+ return;
6
+ }
7
+ try {
8
+ child_process.execSync('git submodule update --init', { stdio: 'inherit' });
9
+ console.log('子模块初始化成功');
10
+ } catch (error) {
11
+ console.error(`子模块初始化失败: ${error.message}`);
12
13
+}
+initSubmodule();
0 commit comments