Skip to content

Commit

Permalink
fix(cli): type declarations in build output were incorrectly placed (d…
Browse files Browse the repository at this point in the history
…igdir#2736)

- Fixed `rootDir`, so the tsc output is no longer
`<outDir>/packages/cli/...`
- Set output of type declarations to be the same as the ESM build, so we
no longer require a separate `"types"` field in `package.json`
  • Loading branch information
unekinn authored Nov 5, 2024
1 parent 7e4ef2d commit 487d10a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
"bin": "dist/bin/designsystemet.js",
"exports": {
"./color": {
"types": "./dist/types/src/colors/index.d.ts",
"import": "./dist/src/colors/index.js"
},
"./tokens/*": {
"types": "./dist/types/src/tokens/*",
"import": "./dist/src/tokens/*"
}
},
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/build",
"declarationDir": "./dist/types",
"rootDir": "./",
"outDir": "./dist",
"composite": false,
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": false,
Expand All @@ -14,6 +14,5 @@
"sourceMap": false,
"incremental": false
},
"rootDir": "./src",
"include": ["./src", "./bin/", "./declarations.d.ts"]
}

0 comments on commit 487d10a

Please sign in to comment.