Styledictionary/4/Hook Api Actions
What Changed
This codemod updates registered actions to be placed inside the hooks.actions property, instead of action. Note the shift from the singular to the plural form in this update.
Before
export default {action: {"copy-assets": {do: () => {},undo: () => {},},},platforms: {css: {actions: ["copy-assets"],files: [{ format: "css/variables", destination: "_variables.css" }],},},};
After
export default {platforms: {css: {actions: ["copy-assets"],files: [{ format: "css/variables", destination: "_variables.css" }],},},hooks: {actions: {"copy-assets": {do: () => {},undo: () => {},},},},};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community