Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antfu/vscode-auto-npx
Auto resolving local Node.js binaries in VS Code terminal.
https://github.com/antfu/vscode-auto-npx
npx vscode
Last synced: 4 days ago
JSON representation
Auto resolving local Node.js binaries in VS Code terminal.
- Host: GitHub
- URL: https://github.com/antfu/vscode-auto-npx
- Owner: antfu
- Created: 2021-09-25T17:00:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-13T12:20:36.000Z (4 months ago)
- Last Synced: 2024-10-16T21:10:21.397Z (18 days ago)
- Topics: npx, vscode
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=antfu.auto-npx
- Size: 215 KB
- Stars: 101
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Auto NPX
Auto resolving local Node.js binaries in VS Code terminal.
### Usage
When you have packages installed locally, just call it without `npx`! (and you don't need to install them globally anymore)
```diff
- $ npx vite
+ $ vite- $ npx jest
+ $ jest- $ npx -p typescript tsc
+ $ tsc- $ npx -p webpack-cli webpack
+ $ webpack
```### How
When you open up a terminal in VS Code, this extension injects `PATH` env variable with the local Node.js binaries.
```bash
export PATH=$PWD/node_modules/.bin:$PATH
```And that's it!
The `PATH` modification will only affect the current session so no worries about your other environments.