Skip to content

Commit a3fba2a

Browse files
chore: wip
1 parent 5c5d15d commit a3fba2a

File tree

10 files changed

+34
-16
lines changed

10 files changed

+34
-16
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
12
export const x: number = 1

packages/dtsx/.test-cli/check-test/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"include": [
99
"src/**/*.ts"
1010
]
11-
}
11+
}

packages/dtsx/.test-cli/convert-test/src/zod-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
export interface Config {
23
host: string
34
port: number

packages/dtsx/.test-cli/docs-test/api-docs/API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API Documentation
22

3-
> Generated on 2025-11-27T13:47:18.370Z
3+
> Generated on 2025-11-30T12:48:29.571Z
44
55
## Table of Contents
66

@@ -12,7 +12,7 @@
1212
### greet
1313

1414
```typescript
15-
export function greet(name: string): string
15+
export function greet (name: string) : string
1616
```
1717

1818
A well-documented function

packages/dtsx/.test-cli/docs-test/src/documented.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/**
23
* A well-documented function
34
* @param name - The name to greet
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { bar } from './bar'
2+
3+
import { foo } from './foo'

packages/dtsx/.test-cli/workspace-test/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"compilerOptions": {
33
"target": "ESNext"
44
}
5-
}
5+
}

packages/dtsx/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ dtsx watch --root ./src --outdir ./dist --debounce 300
166166
Bundle multiple declaration files into a single file:
167167

168168
```bash
169-
dtsx bundle --outdir ./dist --output bundle.d.ts
169+
# Bundle declarations using the generate command with --bundle flag
170+
dtsx generate --bundle --bundle-output index.d.ts
171+
172+
# Or with custom output directory
173+
dtsx generate --outdir ./dist --bundle --bundle-output types.d.ts
170174
```
171175

172176
#### Workspace/Monorepo Support
@@ -284,11 +288,10 @@ echo "export function foo(): string { return 'bar' }" | dtsx stdin
284288

285289
- `--debounce <ms>`: Debounce delay in milliseconds _(default: 100)_
286290

287-
#### Bundle Options
291+
#### Bundle Options (use with generate command)
288292

289-
- `--output <file>`: Output filename _(default: 'index.d.ts')_
290-
- `--banner <text>`: Add banner comment to output
291-
- `--footer <text>`: Add footer comment to output
293+
- `--bundle`: Enable bundling of declarations into a single file
294+
- `--bundle-output <file>`: Output filename when bundling _(default: 'index.d.ts')_
292295

293296
To learn more, head over to the [documentation](https://dtsx.stacksjs.org/).
294297

packages/dtsx/build.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ console.log('Building...')
66
await fs.rm('./dist', { recursive: true, force: true })
77

88
await Bun.build({
9-
entrypoints: ['./src/index.ts', './bin/cli.ts'],
9+
entrypoints: [
10+
'./src/index.ts',
11+
'./bin/cli.ts',
12+
'./src/plugins/vite.ts',
13+
'./src/plugins/bun.ts',
14+
'./src/plugins/esbuild.ts',
15+
'./src/plugins/tsup.ts',
16+
'./src/plugins/webpack.ts',
17+
'./src/plugins/index.ts',
18+
],
1019
outdir: './dist',
1120
format: 'esm',
1221
target: 'bun',

packages/dtsx/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@
2929
"import": "./dist/src/index.js"
3030
},
3131
"./vite": {
32-
"types": "./dist/src/plugins/vite.d.ts",
32+
"types": "./dist/plugins/vite.d.ts",
3333
"import": "./dist/src/plugins/vite.js"
3434
},
3535
"./bun": {
36-
"types": "./dist/src/plugins/bun.d.ts",
36+
"types": "./dist/plugins/bun.d.ts",
3737
"import": "./dist/src/plugins/bun.js"
3838
},
3939
"./esbuild": {
40-
"types": "./dist/src/plugins/esbuild.d.ts",
40+
"types": "./dist/plugins/esbuild.d.ts",
4141
"import": "./dist/src/plugins/esbuild.js"
4242
},
4343
"./tsup": {
44-
"types": "./dist/src/plugins/tsup.d.ts",
44+
"types": "./dist/plugins/tsup.d.ts",
4545
"import": "./dist/src/plugins/tsup.js"
4646
},
4747
"./webpack": {
48-
"types": "./dist/src/plugins/webpack.d.ts",
48+
"types": "./dist/plugins/webpack.d.ts",
4949
"import": "./dist/src/plugins/webpack.js"
5050
},
5151
"./plugins": {
52-
"types": "./dist/src/plugins/index.d.ts",
52+
"types": "./dist/plugins/index.d.ts",
5353
"import": "./dist/src/plugins/index.js"
5454
},
5555
"./*": {

0 commit comments

Comments
 (0)