verzia kontrolného balíka npm
local packages:
~$ npm list
globally installed packages:
~$ npm list -g
specific package:
~$ npm list <package>
verzia npm
npm install -g npm@latest
nainštalujte balík npm
npm install package-name
To save as a dependency:
npm install package-name --save
verzia balíka npm
// How to increment your project version
Ex: 1.0.0
* npm version patch ---> 1.0.1
* npm version minor ---> 1.1.0
* npm version major ---> 2.0.0
npm version [<newversion> | major | minor | patch | premajor |
preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
čo znamená " * " verzia v závislosti od balíka npm
Finally there is the *, which while available, isn’t used as often. The primary reason for its less frequent use is the fact that it acts as a stand in for either the major, minor, or patch number and catches any version number for the place that it represents. For example a dependency with a version of * would equate to any version that was greater than or equal to 0.0.0, while 1.* would allow versions greater than or equal to 1.0.0 and less than 2.0.0.
ako nainštalovať najnovšiu verziu balíka npm
//For global packages
npm i -g <package name>@latest
npm i -g express@latest
//For loacal packages
npm outdated
npm update
//Manually updating local packages
npm i <package name>@latest
npm update "react" "react-dom"