Skip to content

Commit 76bf4af

Browse files
authored
docs: added upgrading guide (#1476)
* chore: aligned this left-over with previous change https://github.com/pattern-lab/patternlab-node/blob/dev/packages/docs/src/docs/advanced-config-options.md?plain=1#L212 * docs: created upgrade guide * docs: further optimizations
1 parent 7af21dc commit 76bf4af

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

UPGRADE_GUIDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Upgrading Pattern Lab Node
2+
3+
To upgrade the Node version of Pattern Lab do the following:
4+
5+
## Version 6 instructions
6+
7+
- Ensure that you're using at least Node.js version 14, to which we've upgraded to with [!1430](https://github.com/pattern-lab/patternlab-node/pull/1430)
8+
- If you haven't migrated from `mustache` to `handlebars` engine and templates so far, now would be a good time as `mustache` has been replaced by `handlebars` as the default template language with version 5 of pattern lab, and `mustache` might get removed sooner rather than later. To make a long story short, `handlebars` is mostly compatible, but more mature than `mustache`, so a migration shouldn't be too hard, and even beneficial. Additionally using `mustache` templates most likely won't work anymore starting with this new major version 6 due to these potentially breaking changes for `mustache` usage:
9+
- Removed `styleModifiers` with [!1452](https://github.com/pattern-lab/patternlab-node/pull/1452), that haven't been mentioned in the documentation any more anyhow.
10+
- replaced `hogan.js` by `handlebars` rendering [!1456](https://github.com/pattern-lab/patternlab-node/pull/1456), that would expect the usage of block helpers instead of typical mustache iterations over objects.
11+
- Please explicitly configure your used engine within `patternlab-config.json` as described within the documentations section https://patternlab.io/docs/editing-the-configuration-options/#heading-engines. The previous way of scanning `node_modules` folder for pattern engines is deprecated and will be removed with version 7.
12+

packages/core/src/lib/pattern_engines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function findEnginesInConfig(config) {
6767
return config.engines;
6868
}
6969
logger.warning(
70-
"Scanning the 'node_modules' folder for pattern engines is deprecated and will be removed in v6."
70+
"Scanning the 'node_modules' folder for pattern engines is deprecated and will be removed in v7."
7171
);
7272
logger.warning(
7373
'To configure your engines in patternlab-config.json, see https://patternlab.io/docs/editing-the-configuration-options/#heading-engines'

0 commit comments

Comments
 (0)