Forked from garystafford/helpful-npm-commands.sh
Last active
August 29, 2015 14:18
-
-
Save solsend2l/6323c67c895e4e2b43b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Helpful npm commands and code snippets | |
############################################################################### | |
# list top level packages w/o dependencies | |
npm list --depth=0 | sort | |
npm list --depth=0 | sort -g | |
# list top level packages that are outdated w/o dependencies | |
npm outdated --depth=0 | sort | |
npm outdated --depth=0 -g | sort | |
npm install -g <pkg>@<x.x.x> | |
npm install -g <pkg>@latest | |
npm update --save | |
npm update --save-dev | |
npm update -g <pkg1> <pkg2> <pkg3> | |
# Update to latest dependencies, ignore and update package.json! | |
npm install -g npm-check-updates | |
npm-check-updates | |
npm-check-updates -u | |
npm update # verify new versions work with project | |
# alternate tool to check and update dependencies | |
npm install -g david | |
bower list | sort | |
bower update | |
bower prune # uninstalls local extraneous packages | |
echo 'export PATH=$PATH:$HOME/.node/bin' >> ~/.bashrc && \ | |
echo 'export DOCKER_HOST=tcp://localhost:4243' >> ~/.bashrc && \ | |
. ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment