Skip to content

Commit

Permalink
feat: remove CJS, no implicit any
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Jun 18, 2024
1 parent c35a0b6 commit 9f12de9
Show file tree
Hide file tree
Showing 22 changed files with 126 additions and 502 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-points-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/sd-transforms': major
---

BREAKING: remove CommonJS entrypoint and tools/scripts required to dual publish. Now that Style Dictionary v4 is ESM-only, this library will follow suit.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ Both APIs will be stable then.

## Usage

> Note: this library is available both in CJS and ESM
> [!NOTE]
> This library is only available in ESM
```js
import { registerTransforms } from '@tokens-studio/sd-transforms';
Expand Down Expand Up @@ -215,6 +216,7 @@ StyleDictionary.registerTransform({

### Custom Transform Group

> [!NOTE]
> From Style-Dictionary `4.0.0-prerelease.18`, [`transformGroup` and `transforms` can now be combined in a platform inside your config](https://github.com/amzn/style-dictionary/blob/v4/CHANGELOG.md#400-prerelease18).
You can create a custom `transformGroup` that includes the individual transforms from this package.
Expand Down Expand Up @@ -255,7 +257,8 @@ Options:
| ['ts/color/modifiers'] | ColorModifierOptions || See props below | Color modifier options |
| ['ts/color/modifiers'].format | ColorModifierFormat || `undefined` | Color modifier output format override ('hex' \| 'hsl' \| 'lch' \| 'p3' \| 'srgb'), uses local format or modifier space as default |

> Note: you can also import and use the `parseTokens` function to run the parsing steps on your tokens object manually.
> [!NOTE]
> You can also import and use the `parseTokens` function to run the parsing steps on your tokens object manually.
> Handy if you have your own preprocessors set up (e.g. for JS files), and you want the preprocessor-based features like composites-expansion to work there too.
## Theming
Expand Down
26 changes: 0 additions & 26 deletions handle-bundled-cjs-deps.js

This file was deleted.

Loading

0 comments on commit 9f12de9

Please sign in to comment.