why does it include files like public/font-awesome-4.7.0/css/font-awesome.css even though "font-awesome-4.7.0" is listed in excludedFolders?


- extension.js
```js
const vscode = require('vscode');
const fs = require('fs');
const path = require('path');
const ignore = require('ignore');

function activate(context) {
  let disposable = vscode.commands.registerCommand('extension.code2prompt.listCodeBaseFiles', function () {
    const workspaceFolders = vscode.workspace.workspaceFolders;
    if (!workspaceFolders) {
      vscode.window.showErrorMessage('No workspace folder open');
      return;
    }

    const rootPath = workspaceFolders[0].uri.fsPath;

    try {
      // Step 1: Collect all eligible files.
      const listOfFiles = collectFiles(rootPath);

      if (listOfFiles.length === 0) {
        vscode.window.showInformationMessage('No matching files found in the workspace');
      } else {
        // Step 2: Show QuickPick for user selection.
        vscode.window.showQuickPick(listOfFiles, {
          canPickMany: true,
          placeHolder: 'Select files to include in codebase.md',
        }).then(selectedItems => {
          if (!selectedItems || selectedItems.length === 0) {
            vscode.window.showInformationMessage('No files selected');
            return;
          }

          // Step 3: Generate codebase.md with selected files.
          const selectedFiles = selectedItems.map(item => item.label);
          const { totalFiles, outputFileSizeInKB } = generateCodebaseMarkdown(rootPath, selectedFiles);

          vscode.window.showInformationMessage(`${totalFiles} files have been written to codebase.md (${outputFileSizeInKB.toFixed(2)} kb)`);
        });
      }
    }
    catch (error) {
      vscode.window.showErrorMessage(`Error: ${error.message}`);
    }

  });
  context.subscriptions.push(disposable);
}

function collectFiles(rootPath) {
  const config = vscode.workspace.getConfiguration('code2prompt');

  const allowedExtensions = config.get('allowedExtensions');
  const excludedFolders = config.get('excludedFolders');
  const excludedFiles = config.get('excludedFiles');
  const excludedExtensions = config.get('excludedExtensions');
  const MAX_FILE_SIZE = config.get('maxFileSize');

  const ig = ignore();
  if (fs.existsSync(path.join(rootPath, '.gitignore'))) {
    ig.add(fs.readFileSync(path.join(rootPath, '.gitignore')).toString());
  }

  let listOfFiles = [];

  function traverseDirectory(dir) {
    const items = fs.readdirSync(dir);
    const files = [];
    const directories = [];

    for (const item of items) {
      const itemPath = path.join(dir, item);
      const stats = fs.statSync(itemPath);
      const relativePath = path.relative(rootPath, itemPath).replace(/\\/g, '/');

      if (ig.ignores(relativePath)) {
        continue;
      }

      if (stats.isDirectory() && (excludedFolders.includes(item) || excludedFolders.some(excluded => itemPath.includes(excluded)))) {
        continue;
      }

      if (stats.isFile()) {
        if (!excludedFiles.includes(item)) {
          files.push(item);
        }
      } else if (stats.isDirectory()) {
        directories.push(item);
      }
    }

    files.sort((a, b) => a.localeCompare(b));
    directories.sort((a, b) => a.localeCompare(b));

    for (const file of files) {
      const filePath = path.join(dir, file);
      const ext = path.extname(file);
      const stats = fs.statSync(filePath);
      const fileSizeInBytes = stats.size;

      if (ext === '.css') {
        const jsFilePath = path.join(dir, `${path.basename(file, '.css')}.scss`);
        if (fs.existsSync(jsFilePath)) {
          continue;
        }
      }

      if (allowedExtensions.includes(ext) &&
        !excludedExtensions.some(excluded => file.endsWith(excluded)) &&
        fileSizeInBytes <= MAX_FILE_SIZE) {
        const relativePath = path.relative(rootPath, filePath).replace(/\\/g, '/');
        if (!excludedFolders.some(folder => relativePath.includes(folder))) {
          listOfFiles.push({
            label: relativePath,
            picked: true,
            description: `${(fileSizeInBytes / 1024).toFixed(2)} KB`
          });
        }
      }
    }

    for (const directory of directories) {
      const dirPath = path.join(dir, directory);
      traverseDirectory(dirPath);
    }
  }

  traverseDirectory(rootPath);

  return listOfFiles;
}

function generateCodebaseMarkdown(rootPath, selectedFiles) {
  let totalFiles = 0;
  let markdownContent = '';

  for (const relativePath of selectedFiles) {
    const filePath = path.join(rootPath, relativePath);
    const ext = path.extname(filePath).slice(1);
    try {
      const fileContent = fs.readFileSync(filePath, 'utf-8');
      markdownContent += `\n- ${relativePath}\n\`\`\`${ext}\n${fileContent}\n\`\`\`\n`;
      totalFiles++;
    } catch (error) {
      vscode.window.showErrorMessage(`Error reading file ${relativePath}: ${error.message}`);
    }
  }

  if (markdownContent.length === 0) {
    return { totalFiles: 0, outputFileSizeInKB: 0 };
  }

  const outputFile = path.join(rootPath, 'codebase.md');
  fs.writeFileSync(outputFile, markdownContent);

  let outputFileSizeInKB = fs.statSync(outputFile).size / 1024;

  return { totalFiles, outputFileSizeInKB };
}

function deactivate() { }

module.exports = {
  activate,
  deactivate
}
```

- package.json
```json
{
  "name": "andyp-code2prompt",
  "displayName": "andyp-code2prompt",
  "description": "Gather code files to codebase.md for LLM prompting",
  "version": "0.0.11",
  "engines": {
    "vscode": "^1.60.0"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [
    "onCommand:extension.code2prompt.listCodeBaseFiles"
  ],
  "main": "./extension.js",
  "contributes": {
    "commands": [
      {
        "command": "extension.code2prompt.listCodeBaseFiles",
        "title": "andyp-code2prompt: Create codebase.md"
      }
    ],
    "configuration": {
      "title": "Code2Prompt",
      "properties": {
        "code2prompt.allowedExtensions": {
          "type": "array",
          "default": [
            ".json",
            ".html",
            ".js",
            ".scss",
            ".css",
            ".ejs"
          ],
          "description": "File extensions to include in the generated output"
        },
        "code2prompt.excludedFolders": {
          "type": "array",
          "default": [
            "node_modules",
            ".git",
            ".vscode",
            "bin",
            "DB",
            "img",
            "font-awesome-4.7.0",
            "convas-to-blob",
            "javascript-load-image",
            "flatpickr",
            "summernote",
            "qrcode-svg",
            "sifter",
            "tmpl",
            "toastr"
          ],
          "description": "Folders to exclude from the generated output"
        },
        "code2prompt.excludedFiles": {
          "type": "array",
          "default": [
            "code2prompt.js",
            ".gitignore",
            "package-lock.json",
            "nodemon.json"
          ],
          "description": "Files to exclude from the generated output"
        },
        "code2prompt.excludedExtensions": {
          "type": "array",
          "default": [
            ".min.css",
            ".min.js"
          ],
          "description": "File extensions to exclude from the generated output"
        },
        "code2prompt.maxFileSize": {
          "type": "number",
          "default": 200000,
          "description": "Maximum file size in bytes to include in the generated output"
        }
      }
    }
  },
  "scripts": {
    "package": "vsce package"
  },
  "dependencies": {
    "ignore": "^5.3.2"
  },
  "devDependencies": {
    "@types/vscode": "^1.60.0",
    "@types/glob": "^7.1.3",
    "@types/mocha": "^8.2.2",
    "@types/node": "14.x",
    "eslint": "^7.27.0",
    "glob": "^7.1.7",
    "mocha": "^8.4.0",
    "typescript": "^4.3.2",
    "vscode-test": "^1.5.2"
  }
}
```