Skip to content
Myr

Improve documentation of global script options (#870)

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

authored by ehmicky · committed by GitHub · parent c8ba426 · Browse files · 2 files+18 added−12 removed
This commit

State

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

Diff stats

2 files+18 added−12 removed

  • other:+18 added−12 removed

2 files+18 added−12 removed

modified:docs/scripts.md+13 added-7 removed
359 unmodified lines
360```361362```js363// Execa364const $$ = $({verbose: true});365await $$`echo example`;364import {$ as $_} from 'execa';365366const $ = $_({verbose: true});367368await $`echo example`;369```370371Or:372
178 unmodified lines
551// isTerminated: false552// }553```554552### Shared options555### Global/shared options556557```sh558# Bash559options="timeout 5"
11 unmodified lines
571```572573```js574// Execa575import {$ as $_} from 'execa';576577const $ = $_({timeout: 5000});572const $$ = $({timeout: 5000});573await $$`echo one`;574await $$`echo two`;575await $$`echo three`;578579await $`echo one`;580await $`echo two`;581await $`echo three`;582```583584### Background processes585
124 unmodified lines
modified:readme.md+5 added-5 removed
108 unmodified lines
109await $({stdio: 'inherit'})`echo unicorns`;110//=> 'unicorns'111```112113#### Shared options113#### Global/shared options114115```js116import {$} from 'execa';116import {$ as $_} from 'execa';117118const $$ = $({stdio: 'inherit'});118const $ = $_({stdio: 'inherit'});119120await $$`echo unicorns`;120await $`echo unicorns`;121//=> 'unicorns'122123await $$`echo rainbows`;123await $`echo rainbows`;124//=> 'rainbows'125```126127#### Piping
913 unmodified lines