Welcome to the development environment for your CSS Modules Intellisense VS Code extension!
This guide walks you through setup, build, run, and packaging instructions to help you get productive fast.
- Node.js (v16 or later recommended)
- VS Code
- TypeScript
- VSCE CLI
From the root of your extension project, run:
npm installTo launch the extension in a VS Code development window:
code .Then press F5 in VS Code to open a new Extension Development Host window with your extension loaded.
Your main extension code lives in:
src/extension.ts
Run the compile script:
npm run compileor, Run the pretest script:
npm run pretestand, You can also run the watch script:
npm run watchWe recommend using Mocha for writing extension tests.
Test entry point (if added):
src/test/
Run the test script:
npm run testMore info: Testing Extensions
After building with npm run pretest, run:
vsce packageThis generates a file like:
css-modules-intellisense-${version}.vsixTo test your .vsix locally:
code --install-extension css-modules-intellisense-${version}.vsix-
Create a publisher account
-
Login:
vsce login <your-publisher-name>
-
Publish:
vsce publish
.
├── src/ # TypeScript source code
├── dist/ # Compiled JS output
├── package.json # Extension manifest
├── README.md # Marketplace documentation
├── CHANGELOG.md # Changelog / release notes
├── vsc-extension-quickstart.md # This file
├── .vscode/ # Debug config
└── tsconfig.json # TypeScript configuration
- Supports
.module.css,.module.scss, and.module.less - Recognizes
import styles from './file.module.css'usage - Lints missing class names
- Supports Rename across both module and usage files
- Supports Go-to-Definition across javascript and typescript files
- Supports Autocomplete across script files through modules
- Planned: Hover, Find References
Happy building with CSS Modules Intellisense! 🎉