Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mini-runner/logHelper): 编译成功时输出时间 #8569

Merged
merged 4 commits into from
Jan 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/taro-mini-runner/src/utils/logHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,35 @@ const printBuildError = (err: Error): void => {
const printSuccess = () => {
getServeSpinner().stopAndPersist({
symbol: '✅ ',
text: chalk.green('编译成功\n')
text: chalk.green(`编译成功 ${new Date().toLocaleString()}\n`)
})
}

export const printPrerenderSuccess = (path: string) => {
getServeSpinner().stopAndPersist({
symbol: '🚀 ',
text: chalk.green(`页面 ${path} 预渲染成功`)
text: chalk.green(`页面 ${path} 预渲染成功 ${new Date().toLocaleString()}`)
})
}

export const printPrerenderFail = (path: string) => {
getServeSpinner().stopAndPersist({
symbol: '⚠️ ',
text: chalk.yellow(`页面 ${path} 预渲染失败:`)
text: chalk.yellow(`${new Date().toLocaleString()} 页面 ${path} 预渲染失败:`)
})
}

const printWarning = () => {
getServeSpinner().stopAndPersist({
symbol: '⚠️ ',
text: chalk.yellow('编译警告.\n')
text: chalk.yellow(`编译警告. ${new Date().toLocaleString()}\n`)
})
}

const printFailed = () => {
getServeSpinner().stopAndPersist({
symbol: '🙅 ',
text: chalk.red('编译失败.\n')
text: chalk.red(`编译失败. ${new Date().toLocaleString()}\n`)
})
}

Expand Down