VSCode Extensions Monorepo
May 24, 2025 · View on GitHub
This is a monorepo containing multiple VSCode extensions.
Structure
.
├── packages/ # VSCode extension packages
│ ├── scratches/ # Scratches extension
│ ├── jest-runner/ # Jest runner extension
│ └── nvm-auto-switch/ # NVM Auto Switch extension
├── shared/ # Shared utilities and libraries
└── pnpm-workspace.yaml
Development
Prerequisites
- Node.js >= 18
- pnpm >= 8
Setup
# Install dependencies
pnpm install
# Build all extensions
pnpm build
# Watch mode for development
pnpm watch
# Run tests
pnpm test
# Lint
pnpm lint
# Type check
pnpm check-types
Adding a New Extension
-
Create a new directory in
packages/:mkdir packages/my-new-extension -
Copy the structure from an existing extension or create from scratch
-
Add the extension's
package.jsonwith proper VSCode extension metadata -
Run
pnpm installfrom the root to link everything
Publishing
Each extension can be published independently:
cd packages/my-extension
pnpm run package
# Then use vsce to publish
Extensions
Scratches
Create and manage scratch files of any type in a dedicated .scratches
directory within your project.
Jest Runner
Run and debug Jest tests with WebStorm-like functionality:
- Inline run/debug buttons above each test
- Test explorer tree view in the sidebar
- Full debugging support with breakpoints
- Support for test modifiers (.only, .skip)
- Multiple ways to run tests (buttons, tree view, commands)
NVM Auto Switch
Automatically switch Node.js versions using nvm based on .nvmrc files:
- Automatic detection and switching when opening projects
- File watching for
.nvmrcchanges - Manual command to trigger version switching
- Configurable notifications