Auto Toggle NPM Scripts

Automatically focuses and expands the relevant NPM scripts in the sidebar when working with monorepos or multiple package.json files.
Features
- 🔄 Automatic Focus: Expands the NPM scripts tree view for the currently active package.json
- 🖥️ Workspace Aware: Works seamlessly across multiple workspace folders
- ⚡ Efficient: Debounced updates and smooth UI interactions
Installation
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+X )
- Search for "Auto Toggle NPM Scripts"
- Click Install
Usage
Just work with your package.json files as normal! The extension will automatically:
- Expand the corresponding NPM scripts when switching between package.json files
- Collapse unrelated scripts
- Keep the NPM scripts view focused on your current context
Requirements
- VS Code 1.97 or newer
- NPM Scripts view should be visible (enable via Command Palette:
> NPM: Show Scripts )
📝 Note: Works best with projects containing multiple package.json files (monorepos, etc.)
| |