5.2.0
版本发布时间: 2022-02-27 22:40:53
google/zx最新发布版本:8.1.4(2024-07-04 18:44:34)
72c8cf0 Added experimental startSpinner()
function.
53a215e Added the signal
field to ProcessOutput
.
bf88f50 Added quiet()
function (#313).
51fb6d5 Improved experemental echo()
function.
import {echo} from 'zx/experimental'
// The echo() can be used both ways:
echo`Current branch is ${branch}.`
// or
echo('Current branch is', branch)
import {startSpinner} from 'zx/experimental'
let stop = startSpinner()
await $`long-running command`
stop()
let p = nothrow($`while true; do :; done`)
setTimeout(() => p.kill('SIGKILL'), 1000)
let {signal} = await p
assert.equal(signal, 'SIGKILL')
await quiet($`grep something from-file`)
// Command and output will not be displayed.