Pergunta

I recently published a package using NPM. I would like to know how NPM manages versioning. When does NPM create a new version of a package? Every time I update my NPM package.json file?

Also, what strategy should I adopt in terms of keeping my repo in sync with the NPM package versions... In other words, should I be creating tags/branches whenever I update my package.json etc.? Any other advice or best practices totally welcome.

Foi útil?

Solução

The version is updated when you update package.json and then publish it using npm. Also, I'd create tags on each version release. This way, people who need to access a specific version can do so in your repo without wading through a mess. Good example: https://github.com/visionmedia/mocha/tags

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top