amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.93k stars 557 forks source link

feat: allow outputReferences function, publish filter util for it #1145

Closed jorenbroekema closed 7 months ago

jorenbroekema commented 7 months ago

Issue #, if available: fixes https://github.com/amzn/style-dictionary/issues/859 (with this PR feature, you output the resolved value instead of a broken ref with a fallback to make it work) fixes https://github.com/amzn/style-dictionary/issues/882

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

lukasoppermann commented 7 months ago

Hey, just to make sure, this allows any custom function as a filter, correct? But you also provide one that removes references that are not in the output, right?

jorenbroekema commented 7 months ago

Hey, just to make sure, this allows any custom function as a filter, correct? But you also provide one that removes references that are not in the output, right?

Yes correct, I've just added a bunch more docs to illustrate this.