Comparing version 3.0.0 to 3.1.0
@@ -66,2 +66,3 @@ // Copyright 2021 Google LLC | ||
export const globby: typeof _globby.globby & typeof _globby | ||
export const glob: typeof _globby.globby & typeof _globby | ||
export const nothrow: nothrow | ||
@@ -81,2 +82,3 @@ export const os: typeof _os | ||
var globby: typeof _globby.globby & typeof _globby | ||
var glob: typeof _globby.globby & typeof _globby | ||
var nothrow: nothrow | ||
@@ -83,0 +85,0 @@ var os: typeof _os |
{ | ||
"name": "zx", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "A tool for writing better scripts", | ||
@@ -17,9 +17,9 @@ "main": "index.mjs", | ||
"dependencies": { | ||
"@types/fs-extra": "^9.0.11", | ||
"@types/minimist": "^1.2.1", | ||
"@types/node": "^16.0", | ||
"@types/node-fetch": "^2.5.10", | ||
"chalk": "^4.1.1", | ||
"@types/fs-extra": "^9.0.12", | ||
"@types/minimist": "^1.2.2", | ||
"@types/node": "^16.6", | ||
"@types/node-fetch": "^2.5.12", | ||
"chalk": "^4.1.2", | ||
"fs-extra": "^10.0.0", | ||
"globby": "^12.0.0", | ||
"globby": "^12.0.1", | ||
"minimist": "^1.2.5", | ||
@@ -26,0 +26,0 @@ "node-fetch": "^2.6.1", |
@@ -69,14 +69,21 @@ # 🐚 zx | ||
Everything passed through `${...}` will be automatically escaped and quoted. | ||
```js | ||
let count = parseInt(await $`ls -1 | wc -l`) | ||
console.log(`Files count: ${count}`) | ||
let name = 'foo & bar' | ||
await $`mkdir ${name}` | ||
``` | ||
For example, to upload files in parallel: | ||
**There is no need to add extra quotes.** Read more about it in | ||
[quotes](docs/quotes.md). | ||
You can pass an array of arguments if needed: | ||
```js | ||
let hosts = [...] | ||
await Promise.all(hosts.map(host => | ||
$`rsync -azP ./src ${host}:/var/www` | ||
)) | ||
let flags = [ | ||
'--oneline', | ||
'--decorate', | ||
'--color', | ||
] | ||
await $`git log ${flags}` | ||
``` | ||
@@ -114,3 +121,3 @@ | ||
Read more about [pipelines](examples/pipelines.md). | ||
Read more about [pipelines](docs/pipelines.md). | ||
@@ -242,2 +249,8 @@ #### `ProcessOutput` | ||
Also, globby available via the `glob` shortcut: | ||
```js | ||
await $`svgo ${await glob('*.svg')}` | ||
``` | ||
#### `os` package | ||
@@ -349,6 +362,6 @@ | ||
The `zx` can execute scripts written in markdown | ||
([examples/markdown.md](examples/markdown.md)): | ||
([docs/markdown.md](docs/markdown.md)): | ||
```bash | ||
zx examples/markdown.md | ||
zx docs/markdown.md | ||
``` | ||
@@ -395,2 +408,16 @@ | ||
```bash | ||
zx https://medv.io/game-of-life.mjs | ||
``` | ||
#### Executing scripts from stdin | ||
The `zx` supports executing scripts from stdin. | ||
```js | ||
zx <<'EOF' | ||
await $`pwd` | ||
EOF | ||
``` | ||
## License | ||
@@ -397,0 +424,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43023
775
423
Updated@types/fs-extra@^9.0.12
Updated@types/minimist@^1.2.2
Updated@types/node@^16.6
Updated@types/node-fetch@^2.5.12
Updatedchalk@^4.1.2
Updatedglobby@^12.0.1