Skip to content
Myr

Fix script examples (#575)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by amammad · committed by GitHub · parent 2ddec78 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/scripts.md+3 added-3 removed
4 unmodified lines
5```js6import {$} from 'execa';78const {stdout: name} = await $`cat package.json`9 .pipeStdout($`grep name`);9 .pipeStdout($({stdin: 'pipe'})`grep name`);10console.log(name);1112const branch = await $`git branch --show-current`;13await $`dep deploy --branch=${branch}`;
583 unmodified lines
597```598599```js600// Execa601await $`echo example`.pipeStdout($`cat`);601await $`echo example`.pipeStdout($({stdin: 'pipe'})`cat`);602```603604### Piping stdout and stderr to another command605
12 unmodified lines
618```619620```js621// Execa622await $`echo example`.pipeAll($`cat`);622await $({all: true})`echo example`.pipeAll($({stdin: 'pipe'})`cat`);623```624625### Piping stdout to a file626
50 unmodified lines