Skip to content

Instantly share code, notes, and snippets.

@darrenmothersele
Last active March 3, 2020 09:30
Show Gist options
  • Save darrenmothersele/8e85fad00b7fbafa7a704b7e493bf57b to your computer and use it in GitHub Desktop.
Save darrenmothersele/8e85fad00b7fbafa7a704b7e493bf57b to your computer and use it in GitHub Desktop.
NPM publish

Publishing

The prepublish hook will ensure dist files are created before publishing. This way you don't need to commit them in your repository.

# Bump the version first
# It'll also commit it and create a tag
npm version patch -m 'MESSAGE'
# Push the bumped package and tags
git push --follow-tags
# Ship it 🚀
npm publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment