Skip to content

v0.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 06 May 06:45
· 15 commits to main since this release
c15ec16

Minor Changes

  • 00c39e3: BREAKING: no longer using default export, this is considered an anti-pattern for JS libraries. Re-export wildstars with default exports in ESM is one example quirk, another example is CommonJS not supporting default exports next to named exports in a single file. Now, the main export is a named export called "transform" and you have to import it as such.

    Before:

    // ESM
    import styleDictionaryToFigma from '@divriots/style-dictionary-to-figma';
    // CommonJS
    const styleDictionaryToFigma = require('@divriots/style-dictionary-to-figma');
    
    styleDictionaryToFigma({...}) // figma object

    After:

    // ESM
    import { transform } from '@divriots/style-dictionary-to-figma';
    // CommonJS
    const { transform } = require('@divriots/style-dictionary-to-figma');
    
    transform({...}) // figma object