Skip to content

Instantly share code, notes, and snippets.

@aggregate1166877
Last active July 4, 2023 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aggregate1166877/2ca0624d4923f7357611a0c56d2901c9 to your computer and use it in GitHub Desktop.
Save aggregate1166877/2ca0624d4923f7357611a0c56d2901c9 to your computer and use it in GitHub Desktop.

First, do whatever bundling you need to do, example:

npm run build-stuff

Log into NPM:

npm login

Check what will be uploaded. Ensure nothing sensitive is included.

npm publish --dry-run

Publish the package:

npm publish

Note: you can add --access=public for scoped libs.

To auto patch the version:

npm version patch
npm publish

Alternatively:

npm unpublish <packagname>@x.x.x-readme // The specific version readme that you want to update
npm publish

Further reading:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment