335c4n0r

styledictionary/4/instantiating-style-dictionary

No description available

styledictionary4migration
Public
615 executions

Run locally

npx codemod styledictionary/4/instantiating-style-dictionary

What Changed

This codemod updates Style Dictionary to be a class in version 4, rather than a regular JS object. This allows for instance creation using the new class instantiator keyword. Due to ES Modules' asynchronous nature, you must await initialization before accessing properties like tokens on the instance. The .extend() method remains available for creating instances based on another instance.

Before

jsx

After

jsx

Ready to contribute?

Build your own codemod and share it with the community.