Styledictionary/4/Hook Api Preprocessors
Last update
Oct 7, 2024
This codemod updates registered preprocessors to be placed inside the hooks.preprocessors
property, instead of preprocessor
, with a shift from the singular to the plural form. Registered preprocessors now apply globally without requiring explicit application in the config.
Before
export default {preprocessors: {foo: (dictionary) => {// preprocess itreturn dictionary;},},preprocessors: ['foo'],platforms: {css: {preprocessors: ['foo'],},},};
After
export default {preprocessors: ['foo'],platforms: {css: {preprocessors: ['foo'],},},hooks: {preprocessors: {foo: (dictionary) => {// preprocess itreturn dictionary;},},},};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community