Functionality shared between multiple projects


0.9.64 years ago4 years agoMinified + gzip package size for @brandheroes/brandheroes-shared-project in KB


Shared Project

This project contains functionality shared by multiple Brandheroes projects.

Publishing a new version

When a new version of the library should be published, you first have to rebuild the project by running yarn build and committing any changes to git. Then the version number of the package should be bumped, to do this simply run npm version <update_type> where <update_type> is one of the semantic versioning release types (patch/minor/major), then push all your commits to bitbucket. After the commits are merged into the master branch run npm publish to make the changes live on npm.


A push to master branch will

  1. build
  2. test
  3. run npm version patch, updating package.json and tagging the commit
  4. push the new tag to origin/master

A new tag will

  1. build
  2. test
  3. run npm publish (manually triggered in Bitbucket)

As such, a succesful merge into master will automatically version, tag and publish the new version to NPM

Inspiration to push to repo from Pipelines was found here: https://bitbucket.org/site/master/issues/13213/push-back-to-remote-from-pipelines#comment-43167296

https://npme.npmjs.com/docs/tutorials/pipelines.html - This approach didn't seem to work, publishing would fail because no user was added, i.e. the writing of ~/.npmrc fails. Trying with helper lib ci-publish instead.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.