You can compare NPM distribution tags with GIT tags, the main difference is that you can't reassign existing GIT tag to the current commit while it is perfectly ok with NPM tags.
NOTE: You can skip package name in order to target package which is in currently active directory. If you do so, the published version will be possible to install only with npm install or when someone provides published version explicitly with npm install publish a new version ( 0.0.13) of our package to the test dist tag: command you may decide to publish it to some other tag that latest. Publishing with dist tagĪfter you add version number to your package with npm version.
If by any reason you would like to publish to NPM but avoid the default behavior then you should dive into a dist-tag concept. It means that the published version will be installed by default after executing npm install. What you may not be aware of is that by default npm publish marks all your published versions with a latest dist tag (check the "Versions" tab on NPM to verify). npm version minor followed by npm publish and then you package is available on NPM with a new version number. Normally for releasing NPM packages you would use e.g. I will try to explain based on available documentation and my own experience with them.
Npm install latest version of package with tags how to#
What are dist tags and how to use them in your package? While developing or using NPM package registry you may come across npm dist-tag command or multiple dist tags available for one package e.g.