Skip to content

Commit 8651a8c

Browse files
committed
Update README
1 parent b9e53fd commit 8651a8c

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Data Transform Plugin for Pattern Lab
22

3-
This plugin now only works with Twig PatternEngine. You can use old 0.x versions of the plugin for Mustache PatternEngine.
3+
Since version 1.2.0 this plugin should once again work with all PatternEngines.
44

55

66
## Installation
@@ -16,7 +16,9 @@ composer require aleksip/plugin-data-transform
1616

1717
### Pattern-specific data file support for included patterns
1818

19-
Pattern Lab core only supports global data files and a pattern-specific data file for the main pattern. This plugin adds pattern-specific data file support for included patterns.
19+
Pattern Lab core only supports global data files and a pattern-specific data file for the main pattern. This plugin adds pattern-specific data file support for included patterns. This feature works with the include function provided by this plugin with all PatternEngines and also with regular includes in template files with Twig PatternEngine.
20+
21+
Please note that global data from the `_data` directory is considered to be pattern-specific data and will overwrite data inherited from a parent pattern. If you want to override data of an included pattern you can use the `with` keyword.
2022

2123

2224
### Data transform functions
@@ -59,7 +61,7 @@ It is also possible to include [pseudo-patterns](http://patternlab.io/docs/patte
5961

6062
```json
6163
{
62-
"key": "molecules-shila-card.html-variant"
64+
"key": "molecules-shila-card-html-variant"
6365
}
6466
```
6567

@@ -70,11 +72,11 @@ It is also possible to include [pseudo-patterns](http://patternlab.io/docs/patte
7072
{
7173
"key": {
7274
"join()": [
73-
"molecules-comment.html",
75+
"molecules-comment-html",
7476
"<div class=\"indented\">",
75-
"molecules-comment.html",
77+
"molecules-comment-html",
7678
"</div>",
77-
"molecules-comment.html"
79+
"molecules-comment-html"
7880
]
7981
}
8082
}
@@ -123,11 +125,6 @@ The value of `key` will be replaced with an [`Attribute` object](https://www.dru
123125
The value of `key` will be replaced with an `Url` object. Note that in the example `attributes` will be replaced with an `Attribute` object before the `Url` object is created.
124126

125127

126-
## Global data and includes
127-
128-
Please note that global data from the `_data` directory is considered to be pattern-specific data and will overwrite data inherited from a parent pattern. If you want to override data of an included pattern you can use the `with` keyword.
129-
130-
131128
## More examples
132129

133130
Most features provided by this plugin are used in [Shila Drupal theme](https://github.com/aleksip/shila-drupal-theme).

0 commit comments

Comments
 (0)