Styledictionary/4/Hook Api Transform Groups

1.0.2Last update Jan 10, 2025
by@manishjha-04

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