dev-playbooks-cn 1.0.13 → 1.0.14
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/bin/devbooks.js +12 -0
- package/package.json +1 -1
package/bin/devbooks.js
CHANGED
|
@@ -334,6 +334,18 @@ function installSkills(toolIds, update = false) {
|
|
|
334
334
|
|
|
335
335
|
fs.mkdirSync(skillsDestDir, { recursive: true });
|
|
336
336
|
|
|
337
|
+
// 先安装共享目录 _shared(如果存在)
|
|
338
|
+
const sharedSrcDir = path.join(skillsSrcDir, '_shared');
|
|
339
|
+
if (fs.existsSync(sharedSrcDir)) {
|
|
340
|
+
const sharedDestDir = path.join(skillsDestDir, '_shared');
|
|
341
|
+
if (update || !fs.existsSync(sharedDestDir)) {
|
|
342
|
+
if (fs.existsSync(sharedDestDir)) {
|
|
343
|
+
fs.rmSync(sharedDestDir, { recursive: true, force: true });
|
|
344
|
+
}
|
|
345
|
+
copyDirSync(sharedSrcDir, sharedDestDir);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
337
349
|
let installedCount = 0;
|
|
338
350
|
for (const skillName of skillDirs) {
|
|
339
351
|
const srcPath = path.join(skillsSrcDir, skillName);
|