-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Eugene Lazutkin edited this page Sep 3, 2024
·
15 revisions
The dollar-shell is a micro-library for running shell commands and using them in streams with ease in Node, Deno, Bun. It is a tiny, simple, no dependency package.
All streams are created using web streams.
npm i --save dollar-shellimport $, {$sh} from 'dollar-shell';The package exports the following names:
-
$— spawns a process using a template string. It includes the following helpers, which all spawn a process using a template string:-
$.from— returns itsstdoutas a source stream. -
$.to— returns itsstdinas a sink stream. -
$.ioAKA$.through— returns a readable/writeable pair, which can be used as a transformation step in a pipeline.
-
-
$sh— spawns a shell process using a template string. It includes the following helpers, which all spawn a shell process using a template string:-
$sh.from— returns itsstdoutas a source stream. -
$sh.to— returns itsstdinas a sink stream. -
$sh.ioAKA$sh.through— returns a readable/writeable pair, which can be used as a transformation step in a pipeline.
-
- spawn() — spawns a process with advanced ways to configure and control it.
-
$$— spawns a process using a template string based onspawn(). -
shell AKA
sh— a helper to spawn a shell command using a template string. - Various internal utilities: cwd(), currentExecPath(), runFileArgs, shellEscape(), currentShellPath(), buildShellCommand().
$ is used as the default export.