Initially I was just going to post about how to install npm packages while offline, but in case I ever come back to update this page with more tips or package manages, this post is now titled "Package manager tips".
npm tips
- Configure initial values for npm init -y
- npm config set init.author.name YOUR_NAME
- npm config set init.author.email YOUR_EMAIL
- npm config set init.license UNLICENSED
- Installing a package offline:
- versions older than npm 5, use the local-npm package
- npm install --prefer-offline
- Update a package, e.g. Angular CLI
- npm uninstall -g @angular/cli
- npm cache verify # if npm < 5, npm cache clean
- npm install -g @angular/cli@latest
- View the versions of a package:
- npm view webpack version --json
- npm view webpack versions --json
yarn tips
- Configure initial values for yarn init -y
- yarn config set init-author-name YOUR_NAME
- yarn config set init-author-email YOUR_EMAIL
- yarn config set init-license UNLICENSED
No comments:
Post a Comment