|
@@ -51,7 +51,9 @@ function copyTree(src, dest, rel = '') {
|
|
|
const relPath = rel ? `${rel}/${e.name}` : e.name;
|
|
const relPath = rel ? `${rel}/${e.name}` : e.name;
|
|
|
if (SKIP.some(re => re.test(relPath))) continue;
|
|
if (SKIP.some(re => re.test(relPath))) continue;
|
|
|
const s = path.join(src, e.name);
|
|
const s = path.join(src, e.name);
|
|
|
- const d = path.join(dest, e.name);
|
|
|
|
|
|
|
+ // SkillHub 拒绝无扩展名文件:LICENSE → LICENSE.md
|
|
|
|
|
+ const outName = e.name === 'LICENSE' ? 'LICENSE.md' : e.name;
|
|
|
|
|
+ const d = path.join(dest, outName);
|
|
|
if (e.isDirectory()) copyTree(s, d, relPath);
|
|
if (e.isDirectory()) copyTree(s, d, relPath);
|
|
|
else if (e.isFile()) fs.copyFileSync(s, d);
|
|
else if (e.isFile()) fs.copyFileSync(s, d);
|
|
|
}
|
|
}
|