Styledictionary/4/Hook Api Transform Groups
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.registerTransformGrouptransformGroup: {foo: ['foo-transform'],},platforms: {css: {// apply it per platformtransformGroup: ['foo'],},},};
After
export default {platforms: {css: {// apply it per platformtransformGroup: ['foo'],},},hooks: {transformGroups: {foo: ['foo-transform'],},},};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community