Skip to content

Commit 2a840f1

Browse files
chore: minor fixes (#15)
* fix: updated folder name `configuration` * chore: added docs
1 parent 5406a21 commit 2a840f1

8 files changed

Lines changed: 271 additions & 0 deletions

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
13+
# TypeScript and JavaScript files
14+
[*.{ts,js,tsx,jsx}]
15+
indent_style = tab
16+
indent_size = 4
17+
18+
# JSON files
19+
[*.json]
20+
indent_style = tab
21+
indent_size = 2
22+
23+
# Markdown files
24+
[*.md]
25+
trim_trailing_whitespace = false
26+
27+
# YAML files
28+
[*.{yml,yaml}]
29+
indent_style = space
30+
indent_size = 2

CONTRIBUTING.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Contributing to CSS/SCSS Modules IntelliSense
2+
3+
Thank you for your interest in contributing!
4+
Here's how you can help improve this VS Code extension.
5+
6+
## Development Setup
7+
8+
1. **Clone the repository**
9+
10+
```bash
11+
git clone https://github.com/Lokesh-Garg-22/CSS-Modules-IntelliSense.git
12+
cd CSS-Modules-IntelliSense
13+
```
14+
15+
2. **Install dependencies**
16+
17+
```bash
18+
npm install
19+
```
20+
21+
3. **Build the extension**
22+
23+
```bash
24+
npm run compile
25+
```
26+
27+
4. **Run tests**
28+
29+
```bash
30+
npm test
31+
```
32+
33+
## Development Workflow
34+
35+
1. **Open in VS Code**
36+
37+
- Open the project folder in VS Code
38+
- Press `F5` to launch the Extension Development Host
39+
40+
2. **Make your changes**
41+
42+
- Source code is in the `src/` directory
43+
- Follow the existing code style and structure
44+
45+
3. **Test your changes**
46+
47+
- Use the Extension Development Host to test
48+
- Write unit tests for new functionality
49+
- Run `npm run lint` to check for linting errors
50+
51+
4. **Build and verify**
52+
53+
```bash
54+
npm test
55+
```
56+
57+
## Project Structure
58+
59+
```
60+
src/
61+
├── libs/ # Core libraries (caching, document processing)
62+
├── providers/ # Language feature providers
63+
├── types/ # TypeScript type definitions
64+
├── utils/ # Utility functions
65+
└── test/ # Test files
66+
```
67+
68+
## Submitting Changes
69+
70+
1. **Create a branch**
71+
72+
```bash
73+
git checkout -b feature/your-feature-name
74+
```
75+
76+
2. **Commit your changes**
77+
78+
- Write clear, descriptive commit messages
79+
- Reference issue numbers when applicable
80+
81+
3. **Submit a Pull Request**
82+
- Provide a clear description of the changes
83+
- Link to any related issues
84+
- Ensure all tests pass
85+
86+
## Coding Standards
87+
88+
- Use TypeScript for all new code
89+
- Follow the existing code style
90+
- Add JSDoc comments for public APIs
91+
- Write tests for new features
92+
- Keep functions focused and modular
93+
94+
## Reporting Issues
95+
96+
- Use GitHub Issues to report bugs
97+
- Provide a clear description and reproduction steps
98+
- Include VS Code version and extension version
99+
- Share relevant code samples or screenshots
100+
101+
## Questions?
102+
103+
Feel free to open an issue for any questions or discussions!
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/PROJECT_STRUCTURE.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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

docs/TODO.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TODO
2+
3+
## Enhancements
4+
5+
<!-- Add enhancements here -->
6+
7+
## Known Issues
8+
9+
<!-- Add known issues here -->
10+
11+
## Future Improvements
12+
13+
<!-- Add future improvements here -->

0 commit comments

Comments
 (0)