build: display status log in one line

This commit is contained in:
leejooy96 committed 2022-06-13 11:37:36 +09:00
1 parent c1cf1dc6a5
commit ddfffb5a2f
1 file changed
+3 -4
+3 -4
View File
@@ -22,15 +22,14 @@ function log (processName, data, color = 'yellow') {
if (typeof data === 'object') {
data.toString().split(/\r?\n/).forEach(line => {
strLog += ' ' + line + '\n'
strLog += ' ' + line + '\n'
})
} else {
strLog += ` ${data}\n`
strLog += ` ${data}\n`
}
if (/[\dA-z]+/.test(strLog)) {
console.log(`${chalk[color].bold(`[${processName}]---------------`)}\n`)
console.log(`${strLog}${chalk[color].bold(`[${processName}]---------------`)}\n`)
console.log(`${chalk[color].bold(`[${processName}] >`)}${strLog}`)
}
}