Skip to content

Commit

Permalink
Fix export of JS tokens (#4257)
Browse files Browse the repository at this point in the history
* fix js directory location to be bundled + entrypoint

* add changeset

* add tokens alias

* rename alias

* remove alias from jest config:
  • Loading branch information
gyfchong authored Nov 2, 2023
1 parent 62af1a0 commit 30c5ad6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-icons-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/design-tokens": patch
---

Fix export of JS tokens
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { HTMLAttributes } from "react"
import { Meta, StoryFn } from "@storybook/react"
import colorString from "color-string"
import { tokens } from "@kaizen/design-tokens/js"
import { Heading } from "@kaizen/typography"
import { tokens } from "~design-tokens/js"

export default {
title: "Systems/Tokens/Classname References/Color Tokens",
Expand Down
4 changes: 4 additions & 0 deletions packages/design-tokens/js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"main": "../dist/js/index.js",
"types": "../dist/js/index.d.ts"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions storybook/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default ({ config }: { config: Configuration }): Configuration => {
"~types": path.resolve(__dirname, "../packages/components/src/types"),
"~utils": path.resolve(__dirname, "../packages/components/src/utils"),
"~components": path.resolve(__dirname, "../packages/components/src"),
"~design-tokens": path.resolve(__dirname, "../packages/design-tokens/src"),
// i18n-react-intl package attempts to import locales from this path.
// When rollup attempts to import from the 'find' path, it will be
// redirected to import from the replacement path (Same as KAIO rollup config).
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"~storybook/*": ["storybook/*"],
"~types/*": ["packages/components/src/types/*"],
"~utils/*": ["packages/components/src/utils/*"],
"~components/*": ["packages/components/src/*"]
"~components/*": ["packages/components/src/*"],
"~design-tokens/*": ["packages/design-tokens/src/*"]
}
},
"files": ["./types.d.ts"],
Expand Down

0 comments on commit 30c5ad6

Please sign in to comment.