Skip to content

Commit

Permalink
fix(cli): perf should be generated no matter what feature was chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed Dec 30, 2023
1 parent 395cb7f commit 14e8928
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ async function interactive({
log.success(`Successfully unminified ${c.green(unminifyInputPaths.length)} files ${c.dim(`(${formatElapsed(elapsed)})`)}`)

outro(`Output directory: ${c.green(getRelativePath(cwd, outputDir))}`)
}

if (perf) {
const measurement = timing.getMeasurement()
printPerfStats(measurement)
writePerfStats(measurement, path.join(outputBase, 'perf.json'))
}
if (perf && outputBase) {
const measurement = timing.getMeasurement()
printPerfStats(measurement)
writePerfStats(measurement, path.join(outputBase, 'perf.json'))
}

console.log()
Expand Down Expand Up @@ -556,12 +556,12 @@ async function nonInteractive(features: Feature[], {
log.success(`Successfully unminified ${c.green(unminifyInputPaths.length)} files ${c.dim(`(${formatElapsed(elapsed)})`)}`)

outro(`Output directory: ${c.green(relativeOutputPath)}`)
}

if (perf) {
const measurements = timing.getMeasurement()
printPerfStats(measurements)
writePerfStats(measurements, perfOutputPath)
}
if (perf) {
const measurements = timing.getMeasurement()
printPerfStats(measurements)
writePerfStats(measurements, perfOutputPath)
}
}

Expand Down

0 comments on commit 14e8928

Please sign in to comment.