opkautomation.blogg.se

Npm version
Npm version











npm version

Configure IntelliSense for cross-compiling.

npm version

All because it recognized that it was being run inside of a git repository. Furthermore, it has gone along and created a git tag for us, which is named after the new version. So, in addition to bumping our package’s version and altering our package.json, this command has also added that change and committed it to our local git branch. Woah, did not realize how nosy npm was being here. If run in a git repo, it will also create a version commit and tag. What isn’t directly apparent is that this command also has git implications. The patch argument indicates that we would like to bump our package’s semver version as a patch. npm version bumps our package version for us, altering the version in our package.json file in the process. Breaking it down, line by line npm version patchĪt first glance, this command looks simple. I thought it might be nice to share these learnings with others. How npm and git worked together, also not totally sure.įinally, I did some investigating of each command in order to commit (hooray puns) them and their functionality to memory once and for all. Why git was involved I wasn’t totally sure. I knew what a git tag was (sort of) and understood that my goal at the end of this set of commands was to bump the version of my npm package and publish that new version to the registry. However, given that my knowledge of this workflow originated from watching others or simply being told to do it, I never really gave much thought into what exactly was going on under the hood when each of these three commands were executed. $ npm version patch $ git push -tags origin master $ npm publish If you’ve ever spent much time contributing to or building your own published npm packages, there is a good chance you have run the following set of commands in your terminal. Understanding NPM Versioning With Git Tags













Npm version