Styledictionary/4/Hook Api Transform Groups

/icons/calendar.svg

Last update

Oct 7, 2024

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