sublime-text-npm
npm commands within Sublime Text (v3)
Git integration is handy, so why not npm too?
Installation
- Install node and npm on your machine
- Install Package Control in Sublime Text
- Open the "Command Pallet" (CTRL+SHIFT+P or ⌘+SHIFT+P)
- type "pkgctlinspkg" (for "Package Control: Install Package" ;-)
- type "npm"
- Tah-dah!
Usage
- Open a file (usually a .js or .coffee) in your npm project/package
- CTRL+SHIFT+P or ⌘+SHIFT+P
- Type
npm:
to see all npm commands
- Press Enter to invoke the selected command. The npm command will be run in the directory of your focused file.
Commands Implemented
If you don't see your favorite here, please file an issue.
Install:
- Install Saved Packages:
npm install
- Install Package:
npm install <pkg name>
- Install and Save Package:
npm install <pkg name> --save
- Install and Save Development Package:
npm install <pkg name> --save-dev
[Uninstall]():
- Remove/Uninstall Package:
npm rm
- Remove/Uninstall Saved Package:
npm rm --save --save-dev -save-optional
List:
- List Installed Packages:
npm list --depth 0
- List Installed Packages, Deep:
npm list
Outdated:
- Check for outdated packages:
npm outdated
Run:
- Run Script:
npm run <script>
Update:
- Update Local Packages:
npm update
or npm update <name>
Search:
- Search Packages:
npm search <name>
Link:
- Register this Package for Linking:
npm link
- Link Package Here:
npm link <name>
Test:
Run Arbitrary:
- Run something not covered here (basically,
npm <whatever your input was>
)