Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"husky": "^8.0.1",
"npm-run-all2": "^8.0.4",
"prettier": "^3.8.0",
"tsup": "^8.5.1",
"tsdown": "^0.23.0",
"typescript": "^5.3.3",
"vitest": "^4.0.17"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/docs-builder/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
prepareOutDir,
startDevServer,
writeOutputFile
} from '../dist/index.js'
} from '../dist/index.mjs'

// TODO: For now assume the current directory is the root; need to make this configurable
const rootDir = process.cwd()
Expand Down
14 changes: 6 additions & 8 deletions packages/docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"dist/**"
],
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs"
}
},
"bin": {
Expand All @@ -32,8 +30,8 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"build": "tsup-node",
"watch": "tsup-node --watch",
"build": "tsdown",
"watch": "tsdown --watch",
"ci:build": "run-s clean lint prettier:check type-check test:ci build"
},
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion packages/docs-builder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"noImplicitAny": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"moduleResolution": "node",
// Use "bundler" because the package is bundled with tsdown; this is also required
// in order to resolve dependencies (such as tsdown itself) that only declare their
// types under an `exports` field
"moduleResolution": "bundler",
"resolveJsonModule": true,
"types": ["node"],
// We specify the top-level directory as the root, since TypeScript requires
Expand Down
14 changes: 14 additions & 0 deletions packages/docs-builder/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'tsdown'

export default defineConfig({
tsconfig: 'tsconfig.json',
entry: ['src/index.ts'],
format: ['esm'],
platform: 'node',
// Note that the declaration file source maps must be enabled explicitly; the top-level
// `sourcemap` option below causes tsdown to add a `sourceMappingURL` comment to the
// declaration files, but the map files themselves are only emitted when this is set
dts: { sourcemap: true },
sourcemap: true,
clean: true
})
13 changes: 0 additions & 13 deletions packages/docs-builder/tsup.config.ts

This file was deleted.

Loading