GithubHelp home page GithubHelp logo

node-publish's Introduction

publish

Build Status

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 in your module:

  • if your module is not yet in the registry then publish 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 publish will do nothing
  • if your module has bigger version than the version in the registry then publish will perform a 'npm publish' of your module

Installation

npm install publish

Usage

The most common way of using publish 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, publish 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 with publish 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.
  • --help Print the help of publish.

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

node-publish's People

Contributors

aledbf avatar cmanzana avatar seanpk avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.