npm tips

npm tips

___________________________________________________
tip:
install without optionals (e.g. without re-compiled parts)

npm i --no-optional

___________________________________________________
tip:
set a particular package to use a particular npm repository:

(useful if your private npm cannot serve up that package.

this can happen with sinopia, with a scoped package like angular 2 material: @angular2-material/checkbox)

npm config set @angularclass:registry https://registry.npmjs.org/

___________________________________________________
diagnostics:

view package info, locally installed:

type node_modules\my-package\package.json

---
view package info at the registry (including history):

npm view my-package

---
view ALL installed packages:

npm ls

___________________________________________________


Comments