NPM or not NPM

Node packege manager

What do we know about it?

package.json

npm install <some module>

npm uninstall <some module>

Semantic versioning

npm publish/unpublish

npm init -y

package.json

version

http://semver.org/

MAJOR.MINOR.PATCH

  • description
  • keywords
  • homepage
  • bugs
  • license
  • people fields: author, contributors
  • files
  • main
  • .npmignore
  • .gitignore
  • bin

man, directories ...

 

  • engines
  • os
  • cpu
  • preferGlobal
  • dependencies
  • devDependencies
  • bundledDependencies
  • optionalDependencies
  • peerDependencies

npm install/uninstall

-g

--save

--save-dev

--save-optional

--dry-run

--no-optional

--only=dev

What version should be used?

what is set on

--save?

^1.2.3

npm shrinkwrap

All packages in npm3 peer? 

npm dedupe

start writing a code

npm search

can't be unpublished 

small stat

https://www.npmjs.com/package/number-zero

https://www.npmjs.com/package/is-not-thirteen

https://www.npmjs.com/package/positive-zero

https://www.npmjs.com/package/is-array

https://www.npmjs.com/package/is-positive-integer

https://geektimes.ru/post/273554/

U day

  • npm update
  • npm outdated
  • npm ls

Done)))

But how to work?

NPM scripts

commands:

 

  • npm start
  • npm stop
  • npm restart
  • npm build
  • npm run

npm start: node server.js.

npm run transpile-typescript

private repository

scope

Npm on-site

Questions?

NPM or not NPM

By Vladimir

NPM or not NPM

  • 194