Commit 3332e70
Changed files (2)
docs/getting-started.md
@@ -29,25 +29,10 @@ gives sensible defaults.
## Install
-::: code-group
-
-```bash [node]
+```bash
npm install zx
```
-
-```bash [bun]
-bun install zx
-```
-
-```bash [deno]
-deno install -A npm:zx
-```
-
-```bash [brew]
-brew install zx
-```
-
-:::
+or many [other ways](/setup)
## Usage
docs/setup.md
@@ -12,10 +12,18 @@
::: code-group
-```bash [node]
+```bash [npm]
npm install zx
```
+```bash [yarn]
+yarn add zx
+```
+
+```bash [pnpm]
+pnpm add zx
+```
+
```bash [bun]
bun install zx
```
@@ -45,7 +53,7 @@ brew install zx
:::
-## Channels
+### Channels
zx is distributed in several versions, each with its own set of features.
* Extracted zx core functions go to the [`lite`](https://www.npmjs.com/package/zx?activeTab=versions) channel: `npm i zx@lite`.
@@ -62,6 +70,16 @@ Please check the download sources carefully. Official links are:
* [JSR](https://jsr.io/@webpod/zx)
* [Homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zx.rb)
+### Docker
+If you'd prefer to run scripts in a container, you can pull the zx image from the [ghcr.io](https://ghcr.io).
+[node:22-alpine](https://hub.docker.com/_/node) is used as [a base](https://github.com/google/zx/blob/main/dcr/Dockerfile).
+
+```shell
+docker pull ghcr.io/google/zx:8.5.0
+docker run -t ghcr.io/google/zx:8.5.0 -e="await \$({verbose: true})\`echo foo\`"
+docker run -t -i -v ./:/script ghcr.io/google/zx:8.5.0 script/t.js
+```
+
## Bash
zx mostly relies on bash, so make sure it's available in your environment. If you're on Windows, consider using [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install) or [Git Bash](https://git-scm.com/downloads).