Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.2 KB

npm-tips.md

File metadata and controls

58 lines (42 loc) · 1.2 KB

npm tips


upgrade all packages

sudo npm install -g npm-check-updates
ncu -u
npm install

use local npm packages

 npm config set prefix '~/.npm-global'
 echo 'export PATH=$PATH:~/.npm-global/bin' >> ~/.bashrc
 source ~/.bashrc

install latest npm version

clear npm cache

clean npm cache npm cache clean -f

link a local package source

cd ./my-project
npm link path-to-local-module

install package from github repo commit id

npm install https://github.com/user/project/tarball/commitid --save-dev

download npm package tarball

wget $(npm view packagename dist.tarball)