tsdown 0.2.6 → 0.2.7
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.js +2 -1
- package/dist/options.d.ts +1 -0
- package/dist/run.js +9 -3
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -144,7 +144,7 @@ async function normalizeOptions(options) {
|
|
|
144
144
|
...await loadConfigFile(options),
|
|
145
145
|
...options
|
|
146
146
|
};
|
|
147
|
-
let { entry, format = ["es"], plugins = [], external, clean = false, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts = false, minify, alias, watch = false, inputOptions, outputOptions } = options;
|
|
147
|
+
let { entry, format = ["es"], plugins = [], external, clean = false, silent = false, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts = false, minify, alias, watch = false, inputOptions, outputOptions } = options;
|
|
148
148
|
entry = await resolveEntry(entry);
|
|
149
149
|
format = toArray(format, "es");
|
|
150
150
|
if (clean === true) clean = [];
|
|
@@ -155,6 +155,7 @@ async function normalizeOptions(options) {
|
|
|
155
155
|
format,
|
|
156
156
|
outDir,
|
|
157
157
|
clean,
|
|
158
|
+
silent,
|
|
158
159
|
alias,
|
|
159
160
|
treeshake,
|
|
160
161
|
platform,
|
package/dist/options.d.ts
CHANGED
package/dist/run.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { logger } from "./logger-e0Fr5WMR.js";
|
|
2
2
|
import { default as process } from "node:process";
|
|
3
3
|
import { cac } from "cac";
|
|
4
|
+
import { default as pc } from "picocolors";
|
|
4
5
|
|
|
6
|
+
//#region node_modules/.pnpm/rolldown@0.12.2-snapshot-374cd3d-20240819002934/node_modules/rolldown/package.json
|
|
7
|
+
const version$1 = "0.12.2-snapshot-374cd3d-20240819002934";
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
5
10
|
//#region package.json
|
|
6
|
-
const version = "0.2.
|
|
11
|
+
const version = "0.2.7";
|
|
7
12
|
|
|
8
13
|
//#endregion
|
|
9
14
|
//#region src/cli.ts
|
|
10
15
|
async function runCLI() {
|
|
11
16
|
const cli = cac("tsdown");
|
|
12
|
-
cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).option("-c, --config <filename>", "Use a custom config file").option("--no-config", "Disable config file").option("--format <format>", "Bundle format: esm, cjs, iife", { default: "esm" }).option("--clean", "Clean output directory").option("--minify", "Minify output").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--watch", "Watch mode").action(async (input, flags) => {
|
|
13
|
-
logger.
|
|
17
|
+
cli.command("[...files]", "Bundle files", { ignoreOptionDefaultValue: true }).option("-c, --config <filename>", "Use a custom config file").option("--no-config", "Disable config file").option("--format <format>", "Bundle format: esm, cjs, iife", { default: "esm" }).option("--clean", "Clean output directory").option("--minify", "Minify output").option("--silent", "Suppress non-error logs").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--watch", "Watch mode").action(async (input, flags) => {
|
|
18
|
+
logger.level = flags.silent ? 0 : 3;
|
|
19
|
+
logger.info(`tsdown ${pc.gray(`v${version}`)} powered by rolldown ${pc.gray(`v${version$1}`)}`);
|
|
14
20
|
const { build } = await import("./index.js");
|
|
15
21
|
if (input.length > 0) flags.entry = input;
|
|
16
22
|
await build(flags);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "An even faster bundler powered by Rolldown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,18 +43,19 @@
|
|
|
43
43
|
"chokidar": "^3.6.0",
|
|
44
44
|
"consola": "^3.2.3",
|
|
45
45
|
"fast-glob": "^3.3.2",
|
|
46
|
+
"picocolors": "^1.0.1",
|
|
46
47
|
"pkg-types": "^1.1.3",
|
|
47
48
|
"rolldown": "nightly",
|
|
48
49
|
"unconfig": "^0.5.5",
|
|
49
50
|
"unplugin-isolated-decl": "^0.4.5"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@sxzz/eslint-config": "^3.17.
|
|
53
|
+
"@sxzz/eslint-config": "^3.17.3",
|
|
53
54
|
"@sxzz/prettier-config": "^2.0.2",
|
|
54
|
-
"@types/node": "^20.
|
|
55
|
-
"bumpp": "^9.
|
|
55
|
+
"@types/node": "^20.16.1",
|
|
56
|
+
"bumpp": "^9.5.1",
|
|
56
57
|
"eslint": "^9.9.0",
|
|
57
|
-
"execa": "^9.3.
|
|
58
|
+
"execa": "^9.3.1",
|
|
58
59
|
"fdir": "^6.2.0",
|
|
59
60
|
"prettier": "^3.3.3",
|
|
60
61
|
"tsup": "^8.2.4",
|