|
| 1 | +# Project Structure |
| 2 | + |
| 3 | +This document describes the organization of the |
| 4 | +CSS/SCSS Modules IntelliSense VS Code extension. |
| 5 | + |
| 6 | +## Directory Structure |
| 7 | + |
| 8 | +``` |
| 9 | +css-modules-intellisense/ |
| 10 | +├── .github/ # GitHub-specific files |
| 11 | +│ └── workflows/ # GitHub Actions workflows |
| 12 | +├── .vscode/ # VS Code workspace settings |
| 13 | +│ ├── extensions.json # Recommended extensions |
| 14 | +│ ├── launch.json # Debug configurations |
| 15 | +│ ├── settings.json # Workspace settings |
| 16 | +│ └── tasks.json # Build tasks |
| 17 | +├── assets/ # Static assets |
| 18 | +│ ├── fixtures/ # Test fixtures |
| 19 | +│ └── images/ # Images (icons, screenshots) |
| 20 | +├── configuration/ # Language configuration files |
| 21 | +│ ├── css-language-configuration.json |
| 22 | +│ ├── default-language-configuration.json |
| 23 | +│ ├── less-language-configuration.json |
| 24 | +│ └── scss-language-configuration.json |
| 25 | +├── dist/ # Compiled output (generated) |
| 26 | +├── docs/ # Documentation |
| 27 | +│ └── TODO.md # Tasks and known issues |
| 28 | +├── node_modules/ # Dependencies (generated) |
| 29 | +├── src/ # Source code |
| 30 | +│ ├── libs/ # Core libraries |
| 31 | +│ │ ├── cache.ts # Main cache management |
| 32 | +│ │ ├── checkDocument.ts # Document validation |
| 33 | +│ │ ├── classNameCache.ts # Class name caching |
| 34 | +│ │ ├── cssModuleDependencyCache.ts |
| 35 | +│ │ ├── loadCaches.ts # Cache initialization |
| 36 | +│ │ └── processConfig.ts # Configuration processing |
| 37 | +│ ├── providers/ # Language feature providers |
| 38 | +│ │ ├── completionProvider.ts # Auto-completion |
| 39 | +│ │ ├── definitionProvider.ts # Go-to-definition |
| 40 | +│ │ └── renameProvider.ts # Symbol renaming |
| 41 | +│ ├── test/ # Test files |
| 42 | +│ ├── types/ # TypeScript type definitions |
| 43 | +│ │ ├── cache.ts |
| 44 | +│ │ └── classNameData.ts |
| 45 | +│ ├── utils/ # Utility functions |
| 46 | +│ │ ├── getAllClassNames.ts |
| 47 | +│ │ ├── getAllFiles.ts |
| 48 | +│ │ ├── getAllImportModulePaths.ts |
| 49 | +│ │ ├── getDataOfClassName.ts |
| 50 | +│ │ ├── getFileExtensionRegex.ts |
| 51 | +│ │ ├── getGrammar.ts |
| 52 | +│ │ ├── getGrammarTokens.ts |
| 53 | +│ │ ├── getImportModulePath.ts |
| 54 | +│ │ ├── getImportModuleVarName.ts |
| 55 | +│ │ ├── getPath.ts |
| 56 | +│ │ ├── getRegistry.ts |
| 57 | +│ │ ├── isDocumentModule.ts |
| 58 | +│ │ ├── isPositionInComment.ts |
| 59 | +│ │ ├── isPositionInString.ts |
| 60 | +│ │ └── sanitizeCssInput.ts |
| 61 | +│ ├── config.ts # Extension configuration |
| 62 | +│ └── extension.ts # Extension entry point |
| 63 | +├── syntaxes/ # TextMate grammar files |
| 64 | +│ ├── JavaScript.tmLanguage.json |
| 65 | +│ ├── JavaScriptReact.tmLanguage.json |
| 66 | +│ ├── TypeScript.tmLanguage.json |
| 67 | +│ ├── TypeScriptReact.tmLanguage.json |
| 68 | +│ ├── css.tmLanguage.json |
| 69 | +│ ├── less.tmLanguage.json |
| 70 | +│ └── scss.tmLanguage.json |
| 71 | +├── .editorconfig # Editor configuration |
| 72 | +├── .gitignore # Git ignore rules |
| 73 | +├── .markdownlint.json # Markdown linting rules |
| 74 | +├── .vscode-test.mjs # VS Code test configuration |
| 75 | +├── .vscodeignore # Files to exclude from extension package |
| 76 | +├── CHANGELOG.md # Version history |
| 77 | +├── CONTRIBUTING.md # Contribution guidelines |
| 78 | +├── LICENSE # MIT License |
| 79 | +├── README.md # Project overview |
| 80 | +├── eslint.config.mjs # ESLint configuration |
| 81 | +├── package.json # Node.js package manifest |
| 82 | +├── package-lock.json # Locked dependencies |
| 83 | +├── tsconfig.json # TypeScript configuration |
| 84 | +└── vsc-extension-quickstart.md # Quick start guide |
| 85 | +``` |
| 86 | + |
| 87 | +## Key Directories |
| 88 | + |
| 89 | +### `src/` |
| 90 | + |
| 91 | +Main source code directory containing: |
| 92 | + |
| 93 | +- **libs/**: Core functionality (caching, document processing) |
| 94 | +- **providers/**: VS Code language feature providers |
| 95 | +- **utils/**: Helper functions for various operations |
| 96 | +- **types/**: TypeScript type definitions |
| 97 | + |
| 98 | +### `configuration/` |
| 99 | + |
| 100 | +Language configuration files for different CSS preprocessors (CSS, SCSS, LESS, etc.) |
| 101 | + |
| 102 | +### `syntaxes/` |
| 103 | + |
| 104 | +TextMate grammar files for syntax highlighting in JS/TS files |
| 105 | + |
| 106 | +### `assets/` |
| 107 | + |
| 108 | +Static resources including test fixtures and extension icons |
| 109 | + |
| 110 | +## Build Output |
| 111 | + |
| 112 | +- **dist/**: Compiled JavaScript files (created by `npm run compile`) |
| 113 | +- **node_modules/**: Dependencies (created by `npm install`) |
| 114 | + |
| 115 | +## Entry Points |
| 116 | + |
| 117 | +- **Main Extension**: `src/extension.ts` |
| 118 | +- **Compiled Output**: `dist/extension.js` (specified in `package.json`) |
| 119 | + |
| 120 | +## Configuration Files |
| 121 | + |
| 122 | +- `.editorconfig` - Code style consistency |
| 123 | +- `tsconfig.json` - TypeScript compiler settings |
| 124 | +- `eslint.config.mjs` - Linting rules |
| 125 | +- `package.json` - Extension metadata and dependencies |
0 commit comments