build: display status log in one line
This commit is contained in:
1 parent
c1cf1dc6a5
commit
ddfffb5a2f
1 file changed
+3
-4
+3
-4
@@ -22,15 +22,14 @@ function log (processName, data, color = 'yellow') {
|
|||||||
|
|
||||||
if (typeof data === 'object') {
|
if (typeof data === 'object') {
|
||||||
data.toString().split(/\r?\n/).forEach(line => {
|
data.toString().split(/\r?\n/).forEach(line => {
|
||||||
strLog += ' ' + line + '\n'
|
strLog += ' ' + line + '\n'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
strLog += ` ${data}\n`
|
strLog += ` ${data}\n`
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/[\dA-z]+/.test(strLog)) {
|
if (/[\dA-z]+/.test(strLog)) {
|
||||||
console.log(`${chalk[color].bold(`[${processName}]---------------`)}\n`)
|
console.log(`${chalk[color].bold(`[${processName}] >`)}${strLog}`)
|
||||||
console.log(`${strLog}${chalk[color].bold(`[${processName}]---------------`)}\n`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user