Home

Awesome

npmpub

Build Status NPM version

npm publish on steroid

What is this?

The npm publish command is nice, but you always have to handle things before (fresh tests) and after (tag, GitHub release)... So if you want to release faster, just use this package/command!

Requirements

In order to make use this package and the "GitHub release" feature, you will need a $GITHUB_TOKEN available as an env variable. If you want to use everything except this feature, just use the --no-release option (see below).

Install

$ npm install -D npmpub
# -- or --
$ yarn add --dev npmpub

Usage

Since you are probably maintaining a CHANGELOG (or you should), you already handle by hand version number (because you care about semver, don't you?).

So here is how to use this command:

How to run npmpub?

There is two way:

$ ./node_modules/.bin/npmpub

Or you can add a npm scripts in your package.json

{
  "scripts": {
    "release": "npmpub"
  }
}

This way you can run

$ npm run release
# -- or --
$ yarn release

Options

$ ./node_modules/.bin/npmpub --help

npmpub [options]

--help          Just what you are reading.
--verbose       Get some informations.
--debug         Get all informations about process.
--skip-status   Skip git status check (⚠︎ you might release unversionned stuff).
--skip-fetch    Skip git fetch to compare remote (⚠︎ you might not be able to push).
--skip-compare  Skip git comparison with origin (⚠︎ you might not be able to push).
--skip-cleanup  Skip node_modules cleanup (⚠︎ you might miss some dependencies changes).
--skip-test     Skip test (⚠︎ USE THIS VERY CAREFULLY).
--otp           Prompt for npm's 2FA one-time-password before publishing
--public        Set access to public when publishing @scoped/package
--dry           No publish, just check that tests are ok.
--no-release    No GitHub release from changelog.

CONTRIBUTING

CHANGELOG

LICENSE