theo
theo copied to clipboard
Use OrderedMap to maintain YML input file props order.
In our token setup the order of the YML props has a meaning. e.g. colors are grouped by hue.
As far as I can tell without this patch the order of the output is nondeterministic/scrambled. This is because Immutable.fromJS, at least in our case, converts the input JS array into a non-ordered Map instead of an OrderedMap.
Example.yml
- colorYellow
- colorDarkYellow
- colorGreen
Example.output (without patch)
- $yellow
- $green
- $darkYellow
Example.output (with patch)
- $yellow
- $darkYellow
- $green
@tomger, the failing test just needs a done() in the r func:
lib/tests/effects.js, line 103.
r => { done(); }
worked for me, anyway.