title | tags | |
---|---|---|
Upgrading Pattern Lab |
|
Pattern Lab 2 uses Composer to manage project dependencies. To upgrade an edition based on Pattern Lab 2 do the following:
- In a terminal window navigate to the root of your project
- Type
composer update
During the upgrade process Pattern Lab 2 will move or add any files that are required for the new version to work. It will also update your configuration as appropriate. If you don't have Composer installed please follow the directions for installing Composer that are available on the Composer website. We recommend you install it globally.
Pattern Lab 2 was a complete rewrite and reorganization of Pattern Lab 1. Learn about the changes. To upgrade do the following:
- Download the PHP edition that matches your needs
If you chose a Mustache-based edition do the following:
- Copy
./source
from your old project to your new edition - Copy
./source/_patterns/00-atoms/00-meta/_00-head.mustache
to./source/_meta/_00-head.mustache
- Copy
./source/_patterns/00-atoms/00-meta/_01-foot.mustache
to./source/_meta/_00-foot.mustache
(you can then deletesource/_patterns/00-atoms/00-meta/
directory) - In
./source/_meta/_00-head.mustache
, replace{% raw %}{% pattern-lab-head %}{% endraw %}
with{% raw %}{{{ patternLabHead }}}{% endraw %}
- In
./source/_meta/_00-foot.mustache
replace{% raw %}{% pattern-lab-foot %}{% endraw %}
with{% raw %}{{{ patternLabFoot }}}{% endraw %}
- Copy
./source/_data/annotations.js
to./source/_annotations/annotations.js
- Remove the underscore in front of the JSON files in
source/data
(i.e.data.json
not_data.json
).
If you chose another version do the above and convert the templates as appropriate.
New releases and upgrades are announced in Pattern Lab's PHP room on Gitter and on Twitter at @patternlabio.
You can also determine if your version of Pattern Lab 2 can be upgraded yourself by doing the following:
- In a terminal window navigate to the root of your project
- Type
composer outdated
Two components of Pattern Lab 2 maintain CHANGELOGs as part of their "Releases" page on GitHub: