An ESM-ready version of Style Dictionary.
- Fully ESM-ready
- Allows mocking
fsdependency, improving browser support
consola, with custom levels
- 100% coverage from upstream test suite
- PNPM, tsup, Vite and Vitest for the repository
npm i style-dictionary-esm
I love Design Tokens and the Style Dictionary API!
Migrating to ESM is a tedious task, but I need it to integrate it inside my projects and toolchains.
I would happily move this work as a PR on the original repo, if this work makes sense in the original project roadmap!
This is an initial step in doing a Vite plugin for Style Dictionary.
- Improve tree-shaking
- Moving formats per-file and require none by default
- Avoid relying on global export
- Avoid relying on
fsglobally, but instead support unified storage layer
- Make tests paralellizable, currently
threadshas to be set to