Say I maintain an incredible crab-season
package. I've npm publish
ed version 0.1.0 with a package.json
containing:
"repository": { "type": "git", "url": "https://github.com/example/crab-season.git" }
When I add awesome new features, bump the version to 0.2.0, and push to github will the npmjs registry notice my new version or do I need to npm publish
each time?
Publish to npm Finally, once you're confident this version is ready to release, you can publish the updated package to npm. The publish command will add the updated package to the npm registry.
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a scope in the name (see package. json ).
When you run npm publish , npm bundles up all the files in the current directory. It makes a few decisions for you about what to include and what to ignore. To make these decisions, it uses the contents of several files in your project directory.
Travis CI can publish to npm when you push a version tag to reduce the overhead of releasing a change. Enable in your .travis.yml
with:
deploy: provider: npm api_key: "YOUR API KEY" on: - tags: true
Check the travis docs for details. There's also a step-by-step guide in this post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With