Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @rockholla/git-npm-release with all npm packages installed. Try it out:

var gitNpmRelease = require("@rockholla/git-npm-release")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@rockholla/git-npm-release v0.7.2

A helper around packaging and pushing an npm and git release for a project

@rockholla/git-npm-release

A helper around packaging and pushing an npm and git release for a project

BranchStatus
developBuild Status
masterBuild Status

Usage

npm install --save-dev @rockholla/git-npm-release

When you're done developing everything for a release on your project and have it all committed:

./node_modules/.bin/git-npm-release [public|restricted (default = public)]

The command will do the following:

  1. Ensure that no changes are unstaged in your project
  2. Ask you whether this is a major, minor, or patch release so that package.json can be updated accordingly. You can also just opt to use whatever version is currently in package.json
  3. Run an npm install to update the lock file. Create a git commit after updating the package.json (and lock file) version
  4. If you're on a branch other than master (e.g. using git-flow and on develop), it will merge your branch into the master branch
  5. Create a tag based on your package.json version
  6. Push all updated branches and tags
  7. Finally, run npm publish

You might also consider making an npm script to call the git-npm-release command:

"scripts": {
  "release": "git-npm-release [public|restricted]"
}
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free