@rrlab/tsdown-plugin 1.0.1-git-908d2c0.0 → 1.1.1-git-4903a88.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.mjs +8 -7
- package/package.json +4 -4
- package/src/index.ts +7 -6
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,6 @@ const TOOL_VERSIONS = { tsdown: { install: "^0.22.0" } };
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/index.ts
|
|
10
10
|
const FROM = import.meta.url;
|
|
11
|
-
const UI = colorize("#FF7E18")("tsdown");
|
|
12
11
|
const CONFIG_PKG = "@rrlab/tsdown-config";
|
|
13
12
|
const DEFAULT_CONFIG_FILENAME = "tsdown.config.ts";
|
|
14
13
|
const CONFIG_FILENAMES = [
|
|
@@ -30,11 +29,12 @@ const PRESETS = {
|
|
|
30
29
|
}
|
|
31
30
|
};
|
|
32
31
|
const DEFAULT_PRESET = "lib";
|
|
32
|
+
const tsdownColor = colorize("#FF7E18");
|
|
33
33
|
var TsdownService = class extends ToolService {
|
|
34
34
|
constructor(shellService) {
|
|
35
35
|
super({
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
bin: "tsdown",
|
|
37
|
+
color: tsdownColor,
|
|
38
38
|
shellService,
|
|
39
39
|
from: FROM
|
|
40
40
|
});
|
|
@@ -204,12 +204,13 @@ function setCalleeName(mod, newName) {
|
|
|
204
204
|
if (!ast || ast.callee?.type !== "Identifier") throw new Error("Cannot rename callee: default export is not a simple identifier call.");
|
|
205
205
|
ast.callee.name = newName;
|
|
206
206
|
}
|
|
207
|
-
const tsdown = definePlugin(
|
|
208
|
-
name: "tsdown",
|
|
207
|
+
const tsdown = definePlugin({
|
|
209
208
|
apiVersion: 1,
|
|
209
|
+
name: "tsdown",
|
|
210
|
+
color: tsdownColor,
|
|
210
211
|
install,
|
|
211
212
|
uninstall,
|
|
212
|
-
|
|
213
|
-
})
|
|
213
|
+
services: ({ shell }) => ({ pack: new TsdownService(shell) })
|
|
214
|
+
});
|
|
214
215
|
//#endregion
|
|
215
216
|
export { TOOL_VERSIONS, TsdownService, tsdown as default, install, uninstall };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rrlab/tsdown-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1-git-4903a88.0",
|
|
4
4
|
"description": "tsdown plugin for @rrlab/cli — provides the pack capability for building TS libraries.",
|
|
5
5
|
"homepage": "https://github.com/variableland/dx/tree/main/run-run/tsdown-plugin#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"magicast": "0.3.5",
|
|
37
|
-
"@vlandoss/clibuddy": "0.
|
|
37
|
+
"@vlandoss/clibuddy": "0.7.1-git-4903a88.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"tsdown": ">=0.22.0",
|
|
41
|
-
"@rrlab/cli": "^1.
|
|
41
|
+
"@rrlab/cli": "^1.1.1-git-4903a88.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/semver": "^7.7.1",
|
|
45
45
|
"semver": "^7.8.1",
|
|
46
46
|
"tsdown": "0.22.0",
|
|
47
|
-
"@rrlab/cli": "1.
|
|
47
|
+
"@rrlab/cli": "1.1.1-git-4903a88.0",
|
|
48
48
|
"@rrlab/tsdown-config": "^0.1.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,6 @@ import { TOOL_VERSIONS } from "./tool-versions.ts";
|
|
|
17
17
|
export { TOOL_VERSIONS } from "./tool-versions.ts";
|
|
18
18
|
|
|
19
19
|
const FROM = import.meta.url;
|
|
20
|
-
const UI = colorize("#FF7E18")("tsdown");
|
|
21
20
|
const CONFIG_PKG = "@rrlab/tsdown-config";
|
|
22
21
|
const DEFAULT_CONFIG_FILENAME = "tsdown.config.ts";
|
|
23
22
|
const CONFIG_FILENAMES = [
|
|
@@ -42,10 +41,11 @@ const PRESETS: Record<Preset, PresetInfo> = {
|
|
|
42
41
|
bin: { factory: "defineBinConfig", label: "CLI / Node binary (entry src/run.ts)" },
|
|
43
42
|
};
|
|
44
43
|
const DEFAULT_PRESET: Preset = "lib";
|
|
44
|
+
const tsdownColor = colorize("#FF7E18");
|
|
45
45
|
|
|
46
46
|
export class TsdownService extends ToolService {
|
|
47
47
|
constructor(shellService: ShellService) {
|
|
48
|
-
super({
|
|
48
|
+
super({ bin: "tsdown", color: tsdownColor, shellService, from: FROM });
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async pack() {
|
|
@@ -269,12 +269,13 @@ function setCalleeName(mod: ProxifiedModule, newName: string): void {
|
|
|
269
269
|
ast.callee.name = newName;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
const tsdown = definePlugin(
|
|
273
|
-
name: "tsdown",
|
|
272
|
+
const tsdown = definePlugin({
|
|
274
273
|
apiVersion: 1,
|
|
274
|
+
name: "tsdown",
|
|
275
|
+
color: tsdownColor,
|
|
275
276
|
install,
|
|
276
277
|
uninstall,
|
|
277
|
-
|
|
278
|
-
})
|
|
278
|
+
services: ({ shell }) => ({ pack: new TsdownService(shell) }),
|
|
279
|
+
});
|
|
279
280
|
|
|
280
281
|
export default tsdown;
|