How subucodes/vscode-ext-project-structure-extractor works
Project type and purpose
• This is a Visual Studio Code extension (Node.js) whose job is to scan a user’s workspace folder, build a representation of its folder/file hierarchy (tree or markdown list), and copy it to the clipboard.
File structure
• Top-level files:
• package.json / package-lock.json: extension metadata, dependencies, activation events, commands
• extension.js: main entry point implementing VS Code extension API handlers
• eslint.config.mjs, jsconfig.json: build / lint configuration
• CHANGELOG.md, LICENSE: documentation/artifacts
• .vscode, .vscodeignore: editor and packaging config
• Directory “test” with extension.test.js: unit tests for activation & core logic
• No “frontend”/“backend”—this is a single‐process plugin that runs inside VS Code’s Extension Host.
Relationships & data flows
1. User triggers command (“Extract Project Structure”)
VS Code UI → Extension Host → extension.js (activate & register command)
2. Extension reads configuration settings
3. Scanner Service iterates workspace folder
4. Scanner emits raw tree data → Formatter Service
5. Formatter outputs text → Clipboard Service
6. Progress Service updates status bar during scan
7. Final success notification to user
Architectural patterns & design principles
• Single‐process plugin using VS Code’s Extension Host model
• Modular separation: scanning / formatting / clipboard / UI
• Configuration‐driven behavior (.gitignore, depth, format, file size)
• Test coverage of core logic