Skip to content

Commit

Permalink
fix(cli): limit the exports from ./tokens and export a barrel file at…
Browse files Browse the repository at this point in the history
… root (#2745)
  • Loading branch information
unekinn authored Nov 7, 2024
1 parent 631e3c8 commit c3a0765
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/theme/components/TokenModal/TokenModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Paragraph,
Textfield,
} from '@digdir/designsystemet-react';
import { createTokens } from '@digdir/designsystemet/tokens/create.js';
import { createTokens } from '@digdir/designsystemet/tokens';
import { CodeIcon, InformationSquareIcon } from '@navikt/aksel-icons';
import { CodeSnippet } from '@repo/components';
import { useEffect, useRef, useState } from 'react';
Expand Down
9 changes: 6 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
"homepage": "https://github.com/digdir/designsystemet/tree/main/scripts/cli",
"license": "MIT",
"type": "module",
"types": "./dist/types",
"main": "./dist/src/index.js",
"files": [
"./dist/**"
],
"bin": "dist/bin/designsystemet.js",
"exports": {
".": {
"import": "./dist/src/index.js"
},
"./color": {
"import": "./dist/src/colors/index.js"
},
"./tokens/*": {
"import": "./dist/src/tokens/*"
"./tokens": {
"import": "./dist/src/tokens/index.js"
}
},
"publishConfig": {
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './colors';
export * from './tokens';
1 change: 1 addition & 0 deletions packages/cli/src/tokens/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { type CreateTokensOptions, createTokens } from './create';

0 comments on commit c3a0765

Please sign in to comment.