npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

publish-me-maybe

v1.0.12

Published

npm auto publishing of your modules

Downloads

100

Readme

publish-me-maybe

CircleCI npm version

Fork of https://github.com/cmanzana/node-publish. Forked due to user inactivity on GitHub.

npm module to automate publishing of npm modules. Useful when you want to publish every time you bump the version in your module as part of your continuos integration setup.

When running publish-me-maybe in your module:

  • if your module is not yet in the registry then it will do nothing (you need to publish manually the first version of your module)
  • if your module has the same version, or lower version than the version in the registry then it will do nothing
  • if your module has bigger version than the version in the registry then it will perform a 'npm publish' of your module

Installation

npm install publish-me-maybe

Usage

The most common way of using publish-me-maybe is to have it as a posttest script in your package.json:

"scripts": {
  "test": "tap test/*.js", // tap as an example
  "posttest": "publish"
}

which means that on successful test run, it will try to 'npm publish' your module.

Notice that your CI machine needs to be configured with an npm user (http://npmjs.org/doc/adduser.html) that is authorized to publish the package.

The options that you can use are:

  • --on-major Publishes on major version changes.
  • --on-minor Publishes on minor version changes.
  • --on-patch Publishes on patch version changes.
  • --on-build Publishes on build version changes.
  • --test Prints the versions of the packages and whether it would publish.
  • --tag Publishes the change with the given tag. (npm defaults to 'latest')
  • --version Print the version of publish-me-maybe.
  • --help Print the help of publish-me-maybe.

Examples

publish --on-major --on-minor

will only publish when the local major or minor versions are higher than the remote ones

publish --on-build

will only publish when the local build version is higher than the remote one

publish

will only publish when the local version is higher than the remote one

License

MIT