6 Updating Commonplace
Matt Basta редактировал(а) эту страницу 2013-08-14 14:47:17 -07:00

Updating the Commonplace Library

In order to distribute an update, there are a few things that you need to keep in mind.

How do I push an update?

npm version minor  # Use the appropriate keyword here
git push mozilla master  # Push to github, perhaps make a tag
npm publish

What should I update the version to?

The type of version bump (major, minor, patch) depends on what you did.

  • patch: You made backwards-compatible changes or fixed a bug which doesn't change the expected behavior of the product.
  • minor: You made backwards-incompatible changes, but the changes were not far-reaching.
  • major: You changed enough stuff that it's practically not the same product anymore.

Keep in mind the version support:

  • Only the latest patch version is supported for any major/minor version pair.
  • Only the latest minor version is supported for any major version.
  • Only the two most recent major versions are supported, except for major version 0.

What gets updated?

  • Any .js files will be updated.
  • Any .dist files will be updated.
  • The commonplace node module will be updated (globally), along with any dependencies (listed in package.json).
  • .woff and .svg files will be updated.

The following files will NOT be updated:

  • Stylus and CSS files.
  • Templates
  • index.html
  • Locale/language pack files
  • Files not included in the default Commonplace installation.
  • A .gitignore file that may have been installed with the --gitignore option.

Who gets updated?

Pushing an update does not update anyone. Clients must explicitly run commonplace update to update their installations.

When should I update?

Updates should be made in any of the following cases:

  • Bugs are fixed
  • Features are added
  • Backwards-incompatible changes are made

Updating Client Projects

Just run commonplace update --npm in the root of the project directory (it won't let you run anywhere else).