Skip to content

ncredinburgh/snapshot-publish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 snapshot-publish

Usage

const 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

About

Uses NPM to publish modules, with support for snapshots

Resources

License

Stars

Watchers

Forks

Packages

No packages published