Feature: Add extends mechanism
Problem/Motivation
In a previous prototype, it was possible to extends a design system with another. We still need this.
For example, https://system.design.orange.com/ is extending https://getbootstrap.com/
The related extends
property, to eb added to design system definition (info.yml
file), is already described in the definitions schema:
"extends": {
"$ref": "#/$defs/uri",
"description": "A design system URL Every components, styles, themes, variables, examples and libraries from this parent design system will be duplicated in the current design system, if their ID are not overriden."
},
Proposed feature
Process this property, retrieving the parent design system, and merging the parent definitions with the child definitions. If both design system have identical artefacts ID, only the children one is kept.
This is a recursive mechanism, if the parent also have a parent.
API changes
No, just addition. It is safe