Styledictionary/4/Hook Api Transform Groups

/icons/calendar.svg

Last update

Aug 31, 2024

What Changed

This codemod updates registered transform groups to be placed inside the hooks.transformGroups property, instead of transformGroup, with a shift from the singular to the plural form.

Before

export default {
// register it inline or by SD.registerTransformGroup
transformGroup: {
foo: ['foo-transform'],
},
platforms: {
css: {
// apply it per platform
transformGroup: ['foo'],
},
},
};

After

export default {
platforms: {
css: {
// apply it per platform
transformGroup: ['foo'],
},
},
hooks: {
transformGroups: {
foo: ['foo-transform'],
},
},
};

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now