feat: add build stats hash support (#6980)

This commit is contained in:
ZHAO Jinxiang
2022-02-07 19:37:10 +08:00
committed by GitHub
parent 0cbdf5f15f
commit a2b6409ce0

View File

@@ -68,5 +68,10 @@ module.exports = function formatStats (stats, dir, api) {
)).join(`\n`)
)
return `${ui.toString()}\n\n ${chalk.gray(`Images and other types of assets omitted.`)}\n`
const time = stats.endTime - stats.startTime
const now = new Date().toISOString()
const hash = stats.hash
const info = `Build at: ${chalk.white(now)} - Hash: ${chalk.white(hash)} - Time: ${chalk.white(time)}ms`
return `${ui.toString()}\n\n ${chalk.gray(`Images and other types of assets omitted.`)}\n ${info}\n`
}