Possible to have data inheritance?
The gulp version of patternlab has data inheritance so e.g. inside a molecule json file you don't have to place all the json data from a child/atom. Is there any way to do this with the webpack edition?
In my understanding, data inheritance, in all patternlab editions, never works downwards, e.g. a child will never take it's own .json files for data and will rely on the data of the parent, that includes it. That's my experience from using the PHP Twig edition, gulp mustache edition and the webpack edition.
Sure it works like that for you and it doesn't pick up data from the json files of the meta folder?
For example in the patterns folder:
- there is an atom list-item.mustache with an
<li>{{value}}</li>and a file list-item.json - there is a molecule list.mustache with
<ul>{{> atoms-list-item}}{{> atoms-list-item}}</ul>and a file list.json - there is an organism wrapper.mustache with
<div>{{> molecules-list}}</div>and a wrapper.json
When the wrapper.json doesn't have the json data from list.json then the list won't work inside the wrapper organism. In the gulp version it will inherit the data from the child (in this case list) when it doesn't exist (they merge it and make it global I guess). The advantage of this is that when you make a change in list-item.json you don't have to copy the changes to list.json and wrapper.json.
https://www.aleksip.net/data-inheritance-in-pattern-lab http://patternlab.io/docs/data-overview.html (under data inheritance)
@westenberg I've not tested this scenario, I use local .json for each pattern, and the pattern inheritance of including one mustache into another works good. There's a release upcoming, and maybe it has been fixed, but again I haven't tested it outside local patterns.
I'm using my own fork of plugin-node-data-inheritance, and my use-case is including "global," mostly empty patterns with their own JSON in multiple other patterns (like the same JSON copy of my colors SASS maps for each of my color palette patterns). I'm not sure whether this will work in your scenario, @westenberg, but try it out. Credits to the original plugin and its developer.