mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-21 09:41:34 +03:00
39ce652329
* chore(monorepo): cleanup * fix(tauri-cli): build errors * fix(tauri:build.rs): dont' panic if env missing * fix(finalize): setup for crates * npm publish on release actual publish currently disabled * cargo publish on release actual publish currently disabled * update PR tests for new folder structure * doesn't like the period on job name? * fail on cargo warnings otherwise we would assume green arrow is all good * green on warnings for now
22 lines
397 B
JavaScript
22 lines
397 B
JavaScript
const
|
|
ms = require('ms')
|
|
const chalk = require('chalk')
|
|
|
|
let prevTime
|
|
|
|
module.exports = function (banner, color = 'green') {
|
|
return function (msg) {
|
|
const
|
|
curr = +new Date()
|
|
const diff = curr - (prevTime || curr)
|
|
|
|
prevTime = curr
|
|
|
|
if (msg) {
|
|
console.log(` ${chalk[color](banner)} ${msg} ${chalk.green(`+${ms(diff)}`)}`)
|
|
} else {
|
|
console.log()
|
|
}
|
|
}
|
|
}
|