dk-frontend-skills 1.0.7 → 1.0.9
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/scripts/copy-skills.js +7 -5
package/package.json
CHANGED
package/scripts/copy-skills.js
CHANGED
|
@@ -71,15 +71,16 @@ console.log(" - CLAUDE.md");
|
|
|
71
71
|
// 拷贝完成,不再需要本包,自动卸载
|
|
72
72
|
console.log("🧹 清理安装包...");
|
|
73
73
|
// 用子进程延迟卸载,避免在 npm install 生命周期中自卸导致冲突
|
|
74
|
-
// Windows: detached 会弹黑框,不用;子进程在父进程退出后会自动孤儿化继续运行
|
|
75
|
-
// Unix: 需要 detached 防止父进程退出时 SIGHUP 杀掉子进程
|
|
76
74
|
const spawnOptions = {
|
|
77
75
|
cwd: projectRoot,
|
|
78
76
|
stdio: "ignore",
|
|
79
77
|
};
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
// Windows: detached 防止父进程退出时杀掉子进程,windowsHide 防止弹黑框
|
|
80
|
+
// Unix: detached 防止父进程退出时 SIGHUP 杀掉子进程
|
|
81
|
+
spawnOptions.detached = true;
|
|
82
|
+
if (process.platform === "win32") {
|
|
83
|
+
spawnOptions.windowsHide = true;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
const child = spawn(
|
|
@@ -90,7 +91,8 @@ const child = spawn(
|
|
|
90
91
|
const { execSync } = require("child_process");
|
|
91
92
|
setTimeout(() => {
|
|
92
93
|
execSync("npm uninstall dk-frontend-skills", {
|
|
93
|
-
cwd: ${JSON.stringify(projectRoot)}
|
|
94
|
+
cwd: ${JSON.stringify(projectRoot)},
|
|
95
|
+
windowsHide: true,
|
|
94
96
|
});
|
|
95
97
|
}, 300);
|
|
96
98
|
`,
|