mdk-skills 2.1.9 → 2.1.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/core.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdk-skills",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "mdk-engineer - 沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
package/scripts/core.js CHANGED
@@ -46,7 +46,13 @@ function backupDir(dir) {
46
46
 
47
47
  for (const item of fs.readdirSync(dir)) {
48
48
  if (item === "backups") continue;
49
- copyDirSync(path.join(dir, item), path.join(bakPath, item));
49
+ const srcPath = path.join(dir, item);
50
+ const destPath = path.join(bakPath, item);
51
+ if (fs.statSync(srcPath).isDirectory()) {
52
+ copyDirSync(srcPath, destPath);
53
+ } else {
54
+ fs.copyFileSync(srcPath, destPath);
55
+ }
50
56
  }
51
57
 
52
58
  // 清理旧备份,只保留最近 3 份