目录

Zx logo zx

#!/usr/bin/env zx

await mirrors/zxcat package.json | grep name`

const branch = await mirrors/zxgit branch --show-current`
await mirrors/zxdep deploy --branch=${branch}`

await Promise.all([
  mirrors/zxsleep 1; echo 1`,
  mirrors/zxsleep 2; echo 2`,
  mirrors/zxsleep 3; echo 3`,
])

const name = 'foo bar'
await mirrors/zxmkdir /tmp/${name}`

Bash is great, but when it comes to writing more complex scripts, many people prefer a more convenient programming language. JavaScript is a perfect choice, but the Node.js standard library requires additional hassle before using. No compromise, take the best of both. The zx package provides useful cross-platform wrappers around child_process, escapes arguments and gives sensible defaults.


Crow Watch

Crow Watch

A computing-focused community.

Join at crow.watch/join/zx

Share great links, cool code, and new tools.


Install

npm install zx

All setup options: zx/setup. See also zx@lite.

Usage

Compatibility

See also

  • srf — a tiny, dependency-free static file server for Node.js
  • fx — a JSON cli tool and terminal JSON viewer

License

Apache-2.0

Disclaimer: This is not an officially supported Google product.

    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号