snapshot-publish

1.1.0 • Public • Published

snapshot-publish

Build Status

A thin wrapper around npm publish that detects if the module to be published is at a snapshot version (identified via the SNAPSHOT prerelease tag) and, if so, first unpublishes the previous snapshot then publishes with the snapshot tag. Additionally, milestone versions (-MXX) and release candidate versions (-RCX) are tagged with the milestone and candidate dist tags respectively.

Note that unpublishing does not work on the main NPM registry, however this module is designed to work with private NPM registries such as Sinopia.

Install

$ npm install --save snapshot-publish

Usage

var publish = require('snapshot-publish');
 
publish().then(function () {
    console.log('A new version has been published!');
});

API

snapshotPublish([cwd])

Returns a promise that is resolved when the package has been published.

cwd

Type: string
Default: .

Directory to start looking for a package.json file.

Licence

MIT © NCR Corporation

Readme

Keywords

none

Package Sidebar

Install

npm i snapshot-publish

Weekly Downloads

59

Version

1.1.0

License

MIT

Last publish

Collaborators

  • keirlawson