Skip to content

Instantly share code, notes, and snippets.

@marcolink
Last active July 19, 2018 18:34
Show Gist options
  • Save marcolink/4f7a5cb86237f2f5661bdae5f173d6e0 to your computer and use it in GitHub Desktop.
Save marcolink/4f7a5cb86237f2f5661bdae5f173d6e0 to your computer and use it in GitHub Desktop.
npm cheatsheet

NPM Cheatsheet

Commands

  • --dry-run

package.json

publish with version bump

"scripts": {
  "patch-release": "npm version patch && npm publish && git push --follow-tags",
  "minor-release": "npm version minor && npm publish && git push --follow-tags",
  "major-release": "npm version major && npm publish && git push --follow-tags"
}

call npm run patch-release, npm run minor-release or npm run major-release

Modules

  • shelljs execute shell commands within node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment