tsdown-config-silverwind 1.3.0 → 1.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/dist/index.d.mts +28 -0
- package/dist/{index.js → index.mjs} +13 -3
- package/package.json +11 -11
- package/dist/index.d.ts +0 -20
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserConfig } from "tsdown";
|
|
2
|
+
|
|
3
|
+
//#region index.d.ts
|
|
4
|
+
type CustomConfig = UserConfig & {
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
declare function base({
|
|
8
|
+
url,
|
|
9
|
+
entry,
|
|
10
|
+
report,
|
|
11
|
+
loader,
|
|
12
|
+
outputOptions,
|
|
13
|
+
...other
|
|
14
|
+
}: CustomConfig): UserConfig;
|
|
15
|
+
declare function nodeLib({
|
|
16
|
+
url,
|
|
17
|
+
...other
|
|
18
|
+
}: CustomConfig): UserConfig;
|
|
19
|
+
declare function webLib({
|
|
20
|
+
url,
|
|
21
|
+
...other
|
|
22
|
+
}: CustomConfig): UserConfig;
|
|
23
|
+
declare function nodeCli({
|
|
24
|
+
url,
|
|
25
|
+
...other
|
|
26
|
+
}: CustomConfig): UserConfig;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CustomConfig, base, nodeCli, nodeLib, webLib };
|
|
@@ -17,7 +17,7 @@ function fixEntry(entry) {
|
|
|
17
17
|
}));
|
|
18
18
|
else return entry;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
function base({ url, entry, report, loader, outputOptions,...other }) {
|
|
21
21
|
return {
|
|
22
22
|
entry: fixEntry(entry ?? fileURLToPath(new URL("index.ts", url))),
|
|
23
23
|
report: typeof report === "boolean" ? report : {
|
|
@@ -32,12 +32,18 @@ const base = ({ url, entry, report, loader,...other }) => {
|
|
|
32
32
|
".txt": "text",
|
|
33
33
|
...loader
|
|
34
34
|
},
|
|
35
|
+
outputOptions: {
|
|
36
|
+
legalComments: "none",
|
|
37
|
+
...outputOptions
|
|
38
|
+
},
|
|
35
39
|
...other
|
|
36
40
|
};
|
|
37
|
-
}
|
|
41
|
+
}
|
|
38
42
|
function nodeLib({ url,...other }) {
|
|
39
43
|
return base({
|
|
40
44
|
platform: "node",
|
|
45
|
+
sourcemap: false,
|
|
46
|
+
minify: false,
|
|
41
47
|
url,
|
|
42
48
|
...other
|
|
43
49
|
});
|
|
@@ -45,6 +51,8 @@ function nodeLib({ url,...other }) {
|
|
|
45
51
|
function webLib({ url,...other }) {
|
|
46
52
|
return base({
|
|
47
53
|
platform: "browser",
|
|
54
|
+
sourcemap: true,
|
|
55
|
+
minify: false,
|
|
48
56
|
url,
|
|
49
57
|
...other
|
|
50
58
|
});
|
|
@@ -52,10 +60,12 @@ function webLib({ url,...other }) {
|
|
|
52
60
|
function nodeCli({ url,...other }) {
|
|
53
61
|
return nodeLib({
|
|
54
62
|
platform: "node",
|
|
63
|
+
sourcemap: false,
|
|
64
|
+
minify: true,
|
|
55
65
|
url,
|
|
56
66
|
...other
|
|
57
67
|
});
|
|
58
68
|
}
|
|
59
69
|
|
|
60
70
|
//#endregion
|
|
61
|
-
export { nodeCli, nodeLib, webLib };
|
|
71
|
+
export { base, nodeCli, nodeLib, webLib };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown-config-silverwind",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Shared tsdown configuration",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"repository": "silverwind/tsdown-config-silverwind",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"node": ">=20"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/node": "24.
|
|
21
|
-
"eslint": "9.
|
|
22
|
-
"eslint-config-silverwind": "
|
|
23
|
-
"tsdown": "0.
|
|
24
|
-
"typescript": "5.9.
|
|
25
|
-
"typescript-config-silverwind": "
|
|
26
|
-
"updates": "16.
|
|
27
|
-
"versions": "
|
|
28
|
-
"vitest": "
|
|
29
|
-
"vitest-config-silverwind": "10.
|
|
20
|
+
"@types/node": "24.10.0",
|
|
21
|
+
"eslint": "9.39.1",
|
|
22
|
+
"eslint-config-silverwind": "110.0.0",
|
|
23
|
+
"tsdown": "0.16.0",
|
|
24
|
+
"typescript": "5.9.3",
|
|
25
|
+
"typescript-config-silverwind": "12.0.0",
|
|
26
|
+
"updates": "16.9.1",
|
|
27
|
+
"versions": "14.0.2",
|
|
28
|
+
"vitest": "4.0.7",
|
|
29
|
+
"vitest-config-silverwind": "10.4.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Options } from "tsdown";
|
|
2
|
-
|
|
3
|
-
//#region index.d.ts
|
|
4
|
-
type CustomConfig = Options & {
|
|
5
|
-
url: string;
|
|
6
|
-
};
|
|
7
|
-
declare function nodeLib({
|
|
8
|
-
url,
|
|
9
|
-
...other
|
|
10
|
-
}: CustomConfig): Options;
|
|
11
|
-
declare function webLib({
|
|
12
|
-
url,
|
|
13
|
-
...other
|
|
14
|
-
}: CustomConfig): Options;
|
|
15
|
-
declare function nodeCli({
|
|
16
|
-
url,
|
|
17
|
-
...other
|
|
18
|
-
}: CustomConfig): Options;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { CustomConfig, nodeCli, nodeLib, webLib };
|