Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Releasing

Daniel Pacak edited this page Feb 6, 2016 · 4 revisions

First off, make sure the featurebook package installs and works. This is important. If you cannot install it locally, you'll have problems trying to publish it. Or, worse yet, you'll be able to publish it, but you'll be publishing a broken or pointless package.

In the root of the package working copy, do this:

$ npm install -g .

That'll show you that it's working. Use npm ls -g --depth=0 to see if it's there.

To test a local install, go into some other folder, and then do:

$ cd ../featurebook-examples
$ featurebook server --port 3000

Then navigate to the http://localhost:3000. If there's any problem at this stage fix it before going any further.

$ cd ../featurebook-examples
$ featurebook build --format=pdf && open dist/pdf/specification.pdf

Select a branch that contains the code you want to release. Usually, you'll want to release against the master branch, unless you're releasing a beta version.

Let's assume that the latest version of the featurebook package is 0.0.6 (see the version property in package.json).

$ git clone https://github.com/SOFTWARE-CLINIC/featurebook.git && cd featurebook

To bump the path|minor|major version number and write the new data back to package.json:

$ npm version patch|minor|major -m "[npm] prepare release %s"
v0.0.7

Note that this command will also create a version commit and tag named v0.0.7, and fail if the cloned repository is not clean.

To push the commit and the v0.0.7 tag to the origin repository:

$ git push -u origin master
$ git push -u origin v0.0.7

To publish to the public registry:

$ git checkout tags/v0.0.7
$ npm publish
Clone this wiki locally