mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-12 04:05:12 +00:00
skills readme was getting junk files (#967)
This commit is contained in:
@@ -145,10 +145,11 @@ function parseSkillMetadata(skillPath) {
|
||||
// List bundled assets (all files except SKILL.md), recursing through subdirectories
|
||||
const getAllFiles = (dirPath, arrayOfFiles = []) => {
|
||||
const files = fs.readdirSync(dirPath);
|
||||
const assetPaths = ['references', 'assets', 'scripts'];
|
||||
|
||||
files.forEach((file) => {
|
||||
const filePath = path.join(dirPath, file);
|
||||
if (fs.statSync(filePath).isDirectory()) {
|
||||
if (fs.statSync(filePath).isDirectory() && assetPaths.includes(file)) {
|
||||
arrayOfFiles = getAllFiles(filePath, arrayOfFiles);
|
||||
} else {
|
||||
const relativePath = path.relative(skillPath, filePath);
|
||||
|
||||
Reference in New Issue
Block a user