@stacksjs/dtsx 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/dist/cli.js +85544 -0
- package/dist/config.d.ts +3 -0
- package/dist/extract.d.ts +59 -0
- package/dist/generate.d.ts +5 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +65069 -0
- package/dist/types.d.ts +28 -0
- package/dist/utils.d.ts +11 -0
- package/package.json +86 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DtsGenerationConfig
|
|
3
|
+
*
|
|
4
|
+
* This is the configuration object for the DTS generation process.
|
|
5
|
+
*/
|
|
6
|
+
export interface DtsGenerationConfig {
|
|
7
|
+
cwd: string
|
|
8
|
+
root: string
|
|
9
|
+
entrypoints: string[]
|
|
10
|
+
outdir: string
|
|
11
|
+
keepComments: boolean
|
|
12
|
+
clean: boolean
|
|
13
|
+
tsconfigPath: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* DtsGenerationOption
|
|
18
|
+
*
|
|
19
|
+
* This is the configuration object for the DTS generation process.
|
|
20
|
+
*/
|
|
21
|
+
export type DtsGenerationOption = Partial<DtsGenerationConfig>
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* DtsGenerationOptions
|
|
25
|
+
*
|
|
26
|
+
* This is the configuration object for the DTS generation process.
|
|
27
|
+
*/
|
|
28
|
+
export type DtsGenerationOptions = DtsGenerationOption | DtsGenerationOption[]
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DtsGenerationConfig } from './types'
|
|
2
|
+
|
|
3
|
+
export declare function writeToFile(filePath: string, content: string): Promise<void>
|
|
4
|
+
|
|
5
|
+
export declare function getAllTypeScriptFiles(directory?: string): Promise<string[]>
|
|
6
|
+
|
|
7
|
+
export declare function checkIsolatedDeclarations(options?: DtsGenerationConfig): Promise<boolean>
|
|
8
|
+
|
|
9
|
+
export declare function formatDeclarations(declarations: string): string
|
|
10
|
+
|
|
11
|
+
export declare function formatComment(comment: string): string
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stacksjs/dtsx",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"description": "A modern, fast .d.ts generation tool, powered by Bun.",
|
|
6
|
+
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/stacksjs/dts-generation#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/stacksjs/dts-generation.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/stacksjs/dts-generation/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"dts",
|
|
18
|
+
"generation",
|
|
19
|
+
"isolated declarations",
|
|
20
|
+
"development",
|
|
21
|
+
"bun",
|
|
22
|
+
"stacks",
|
|
23
|
+
"typescript",
|
|
24
|
+
"javascript"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./*": {
|
|
31
|
+
"import": "./dist/*"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"module": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"bin": {
|
|
37
|
+
"dtsx": "./dist/cli.js"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "bun build.ts && bun run compile",
|
|
44
|
+
"compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/dtsx",
|
|
45
|
+
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
|
|
46
|
+
"compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/dtsx-linux-x64",
|
|
47
|
+
"compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/dtsx-linux-arm64",
|
|
48
|
+
"compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/dtsx-windows-x64.exe",
|
|
49
|
+
"compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/dtsx-darwin-x64",
|
|
50
|
+
"compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/dtsx-darwin-arm64",
|
|
51
|
+
"lint": "bunx eslint .",
|
|
52
|
+
"lint:fix": "bunx eslint . --fix",
|
|
53
|
+
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
|
|
54
|
+
"commit": "git cz",
|
|
55
|
+
"changelog": "bunx changelogen --output CHANGELOG.md",
|
|
56
|
+
"prepublishOnly": "bun --bun run build",
|
|
57
|
+
"release": "bun run changelog && bunx bumpp package.json --all",
|
|
58
|
+
"test": "bun test",
|
|
59
|
+
"typecheck": "bunx tsc --noEmit",
|
|
60
|
+
"docs:dev": "vitepress dev docs",
|
|
61
|
+
"docs:build": "vitepress build docs",
|
|
62
|
+
"docs:preview": "vitepress preview docs"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@stacksjs/cli": "^0.67.0",
|
|
66
|
+
"@stacksjs/development": "^0.67.0",
|
|
67
|
+
"@stacksjs/eslint-config": "^3.8.1-beta.2",
|
|
68
|
+
"@types/bun": "^1.1.11",
|
|
69
|
+
"c12": "^2.0.1",
|
|
70
|
+
"neverthrow": "^8.0.0",
|
|
71
|
+
"tinyglobby": "^0.2.9",
|
|
72
|
+
"vitepress": "^1.4.1"
|
|
73
|
+
},
|
|
74
|
+
"simple-git-hooks": {
|
|
75
|
+
"pre-commit": "bunx lint-staged",
|
|
76
|
+
"commit-msg": "bunx --no -- commitlint --edit $1"
|
|
77
|
+
},
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.{js,jsx,ts,tsx,vue}": "bunx eslint . --fix"
|
|
80
|
+
},
|
|
81
|
+
"config": {
|
|
82
|
+
"commitizen": {
|
|
83
|
+
"path": "node_modules/cz-git"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|