Skip to content

Upgrading

Brian Muenzenmeyer edited this page Feb 9, 2016 · 30 revisions

Upgrading Pattern Lab Node

To upgrade the Node version of Pattern Lab do the following:

  1. Important: Make a back-up of source/ and config.json and your Gruntfile|Gulpfile.
  2. Download the latest release of the Node version of Pattern Lab and run npm install from your project directory, or use npm update patternlab-node if you originally installed Pattern Lab via npm.
  3. Restore files in source/ and config.json if needed.
  4. Be mindful of whether you need to merge any customizations to config.json or your Gruntfile|Gulpfile

If you encounter trouble - make sure your npm devDependencies are up to date. Assuming you have the latest package.json file, you can delete the contents of ./node_modules and run npm cache clear before running npm install to pull down everything anew.

Addenda:
  • Upgrading to v1.1.0 requires:

    • Major changes have occurred in the shipped Gruntfile|Gulpfile. It's recommended to take the new versions's file and manually merge any customizations you have. The good news is configurable paths make for a ton more flexibility into the future.
    • Add the following to the config.json:
    "paths" : {
      "source" : {
        "root": "./source/",
        "patterns" : "./source/_patterns/",
        "data" : "./source/_data/",
        "styleguide" : "./core/styleguide/",
        "patternlabFiles" : "./source/_patternlab-files/",
        "js" : "./source/js",
        "images" : "./source/images",
        "fonts" : "./source/fonts",
        "css" : "./source/css/"
      },
    • All .scss files have been removed from the filesystem and Gruntfile|Gulpfile. They caused confusion of sorts and added complexity for little benefit, as the styleguide doesn't change significantly and the shipped pattern styling is not intended to be used. With the roadmap point to other kits, for patterns and the styleguide, this feels like good preparation and aligned with the theme of this release to be about future-consumption.
  • Upgraded to v0.14.0 requires:

    • Adding the following to config.json:

"styleGuideExcludes": [ "templates", "pages" ] ```

  • Upgrading to v0.13.0 requires:
    • Overwriting /source/_patternlab-files/styleguide.mustache
    • Overwriting /source/_patternlab-files/viewall.mustache
  • Upgrading to v0.12.0 requires overwriting: source/_patternlab-files/partials/ishControls.mustache
  • Upgrading to v0.10.X or v0.11.0 requires:
    • Add "baseurl" : "" to config.json
    • Overwrite source/_patternlab-files/pattern-header-footer/footer.html
    • Overwrite source/_patternlab-files/styleguide.mustache
    • Overwrite source/_patternlab-files/viewall.mustache