Skip to content

Commit 246ef8d

Browse files
committed
chore: falling-off performance log. (via --performance to see)
1 parent 2f71e0e commit 246ef8d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: packages/@vuepress/core/lib/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
8383
const relativeDir = path.relative(cwd, outDir)
8484
logger.success(`Generated static files in ${chalk.cyan(relativeDir)}.`)
8585
const { duration } = performance.stop()
86-
logger.debug(`It took a total of ${chalk.cyan(`${duration}ms`)} to run the ${chalk.cyan('vuepress build')}.`)
86+
logger.developer(`It took a total of ${chalk.cyan(`${duration}ms`)} to run the ${chalk.cyan('vuepress build')}.`)
8787
console.log()
8888

8989
// --- helpers ---

Diff for: packages/@vuepress/core/lib/webpack/DevLogPlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = class DevLogPlugin {
3737
isFirst = false
3838
console.log(`${chalk.gray('>')} VuePress dev server listening at ${chalk.cyan(displayUrl)}`)
3939
const { duration } = performance.stop()
40-
logger.debug(`It took a total of ${chalk.cyan(`${duration}ms`)} to run the ${chalk.cyan('vuepress dev')} for the first time.`)
40+
logger.developer(`It took a total of ${chalk.cyan(`${duration}ms`)} to run the ${chalk.cyan('vuepress dev')} for the first time.`)
4141
}
4242
})
4343
compiler.hooks.invalid.tap('vuepress-log', clearScreen)

Diff for: packages/@vuepress/shared-utils/lib/logger.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Logger {
8888
}
8989

9090
developer (...args) {
91-
if (process.env.VUEPRESS_ENV !== 'developer') {
91+
if (process.env.VUEPRESS_ENV !== 'developer' || process.argv.includes('--developer')) {
9292
return
9393
}
9494
this.status('cyan', 'developer', ...args)

0 commit comments

Comments
 (0)