From 2bf873dd92aab7572eae9456a28dec5f3e494a0b Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Mon, 30 Dec 2024 23:41:10 +0300 Subject: [PATCH] docs: mention `halt` and `run` API (#1046) closes #961 --- docs/process-promise.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/process-promise.md b/docs/process-promise.md index 6f7c73adb4..d7eb400bab 100644 --- a/docs/process-promise.md +++ b/docs/process-promise.md @@ -4,10 +4,16 @@ The `$` returns a `ProcessPromise` instance. When resolved, it becomes a [`Proce ```js const p = $`command` // ProcessPromise - const o = await p // ProcessOutput ``` +By default, `$` spawns a new process immediately, but you can delay the start to trigger in manually. + +```ts +const p = $({halt: true})`command` +const o = await p.run() +``` + ## `stdin` Returns a writable stream of the stdin process. Accessing