Before I do a small release and tag it, I'd like to update the package.json to reflect the new version of the program.
Is there a way to edit the file package.json
automatically?
Would using a git pre-release hook
help?
Before I do a small release and tag it, I'd like to update the package.json to reflect the new version of the program.
Is there a way to edit the file package.json
automatically?
Would using a git pre-release hook
help?
npm version
is probably the correct answer. Just to give an alternative I recommend grunt-bump. It is maintained by one of the guys from angular.js.Usage:
If you're using grunt anyway it might be the simplest solution.