uniky 1.0.25 → 1.0.26
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
package/scripts/postinstall.js
CHANGED
|
@@ -124,11 +124,23 @@ export * from './plugin/index.js';
|
|
|
124
124
|
const skillsSourceDir = join(__dirname, '..', 'src', 'plugin', '.skills');
|
|
125
125
|
const skillsTargetDir = join(projectRoot, '.skills');
|
|
126
126
|
if (existsSync(skillsSourceDir)) {
|
|
127
|
-
|
|
127
|
+
if (!existsSync(skillsTargetDir)) {
|
|
128
|
+
mkdirSync(skillsTargetDir, { recursive: true });
|
|
129
|
+
}
|
|
130
|
+
const sourceFiles = readdirSync(skillsSourceDir).filter(f => statSync(join(skillsSourceDir, f)).isFile());
|
|
131
|
+
let skillsCopied = 0;
|
|
132
|
+
sourceFiles.forEach(file => {
|
|
133
|
+
const targetPath = join(skillsTargetDir, file);
|
|
134
|
+
if (!existsSync(targetPath)) {
|
|
135
|
+
copyFileSync(join(skillsSourceDir, file), targetPath);
|
|
136
|
+
skillsCopied++;
|
|
137
|
+
console.log(`[uniky] .skills 新增文件: ${file}`);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
128
140
|
if (skillsCopied > 0) {
|
|
129
141
|
console.log(`[uniky] ✅ .skills 拷贝了 ${skillsCopied} 个新文件到 ${skillsTargetDir}`);
|
|
130
142
|
} else {
|
|
131
|
-
console.log(`[uniky] .skills
|
|
143
|
+
console.log(`[uniky] .skills 所有文件已存在,跳过拷贝`);
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
} catch (error) {
|