dk-frontend-skills 1.0.6 → 1.0.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dk-frontend-skills",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "dk-engineer - 幽默沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
@@ -70,7 +70,18 @@ console.log(" - CLAUDE.md");
70
70
 
71
71
  // 拷贝完成,不再需要本包,自动卸载
72
72
  console.log("🧹 清理安装包...");
73
- // detached 子进程延迟卸载,避免在 npm install 生命周期中自卸导致冲突
73
+ // 用子进程延迟卸载,避免在 npm install 生命周期中自卸导致冲突
74
+ // Windows: detached 会弹黑框,不用;子进程在父进程退出后会自动孤儿化继续运行
75
+ // Unix: 需要 detached 防止父进程退出时 SIGHUP 杀掉子进程
76
+ const spawnOptions = {
77
+ cwd: projectRoot,
78
+ stdio: "ignore",
79
+ };
80
+
81
+ if (process.platform !== "win32") {
82
+ spawnOptions.detached = true;
83
+ }
84
+
74
85
  const child = spawn(
75
86
  process.execPath,
76
87
  [
@@ -79,17 +90,11 @@ const child = spawn(
79
90
  const { execSync } = require("child_process");
80
91
  setTimeout(() => {
81
92
  execSync("npm uninstall dk-frontend-skills", {
82
- cwd: ${JSON.stringify(projectRoot)},
83
- stdio: "inherit"
93
+ cwd: ${JSON.stringify(projectRoot)}
84
94
  });
85
- }, 1500);
95
+ }, 300);
86
96
  `,
87
97
  ],
88
- {
89
- cwd: projectRoot,
90
- detached: true,
91
- stdio: "ignore",
92
- windowsHide: true,
93
- },
98
+ spawnOptions,
94
99
  );
95
100
  child.unref();