@stacksjs/dtsx 0.4.0 → 0.5.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 +14 -1
- package/dist/cli.js +76 -76
- package/dist/index.js +1 -1
- package/package.json +5 -4
- package/dist/config.d.ts +0 -11
- package/dist/extract.d.ts +0 -156
- package/dist/generate.d.ts +0 -5
- package/dist/index.d.ts +0 -6
- package/dist/types.d.ts +0 -28
- package/dist/utils.d.ts +0 -8
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
- Fast .d.ts generation
|
|
11
|
+
- Fast .d.ts generation
|
|
12
12
|
- Highly configurable
|
|
13
13
|
- Lightweight library
|
|
14
14
|
- Cross-platform binary
|
|
@@ -32,6 +32,16 @@ pkgx install dtsx # wip
|
|
|
32
32
|
|
|
33
33
|
There are two ways of using this ".d.ts generation" tool: _as a library or as a CLI._
|
|
34
34
|
|
|
35
|
+
_But before you get started, please ensure you enabled `isolatedDeclarations` in your `tsconfig.json` file._
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"compilerOptions": {
|
|
40
|
+
"isolatedDeclaration": true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
35
45
|
## Library
|
|
36
46
|
|
|
37
47
|
Given the npm package is installed, you can use the `generate` function to generate TypeScript declaration files from your project.
|
|
@@ -49,6 +59,7 @@ const options: DtsGenerationOptions = {
|
|
|
49
59
|
outdir: './dist', // default: './dist'
|
|
50
60
|
keepComments: true, // default: true
|
|
51
61
|
clean: true, // default: false
|
|
62
|
+
verbose: true, // default: false
|
|
52
63
|
}
|
|
53
64
|
|
|
54
65
|
await generate(options)
|
|
@@ -68,6 +79,7 @@ export default {
|
|
|
68
79
|
outdir: './dist',
|
|
69
80
|
keepComments: true,
|
|
70
81
|
clean: true,
|
|
82
|
+
verbose: true,
|
|
71
83
|
}
|
|
72
84
|
```
|
|
73
85
|
|
|
@@ -114,6 +126,7 @@ _Available options:_
|
|
|
114
126
|
- `--keep-comments`: Keep comments in generated .d.ts files _(default: true)_
|
|
115
127
|
- `--clean`: Clean output directory before generation _(default: false)_
|
|
116
128
|
- `--tsconfig <path>`: Specify the path to tsconfig.json _(default: 'tsconfig.json')_
|
|
129
|
+
- `--verbose`: Enable verbose output _(default: false)_
|
|
117
130
|
|
|
118
131
|
To learn more, head over to the [documentation](https://dtsx.stacksjs.org/).
|
|
119
132
|
|