From 79e4ea4d6a316374b467d35c9dbca2e687130237 Mon Sep 17 00:00:00 2001 From: 1aron Date: Thu, 15 Jun 2023 02:54:25 +0800 Subject: [PATCH] Improve(Pack): Logs --- packages/pack/src/bin/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/pack/src/bin/index.ts b/packages/pack/src/bin/index.ts index 9af264d..836ae99 100755 --- a/packages/pack/src/bin/index.ts +++ b/packages/pack/src/bin/index.ts @@ -158,14 +158,11 @@ program.command('pack [entryPaths...]', { isDefault: true }) const ctx = await context(buildOptions) const { metafile } = await ctx.rebuild() if (metafile) { - console.log('') eachBuildTask.metafile = metafile for (const outputFilePath in metafile.outputs) { - const eachOutput = metafile.outputs[outputFilePath] - const outputSize = prettyBytes(eachOutput.bytes).replace(/ /g, '') - const eachOutputFormat = metafile.outputs[outputFilePath]['format'] = eachOptions.format - log`${chalk.dim('│')} $t [${eachOutputFormat}] **${outputFilePath}** ${outputSize} (${Object.keys(eachOutput.inputs).length} inputs)` + metafile.outputs[outputFilePath]['format'] = eachOptions.format } + log.i`**options**` log.tree({ entries: buildOptions.entryPoints, external: buildOptions.external,