bearshell
v0.0.2
Published
A bearbones api for shell scripting in Node.js
Downloads
76
Readme
Bearshell is a minimal package to help shell scripting in Node.js.
Install
npm install bearshell
yarn add bearshell
pnpm add bearshell
Why Bearshell?
Bearshell is inspired by the excellent zx. If you want a broad set of features, Bearshell isn't right for you. Fundamentally, Bearshell is a lightweight wrapper around child_process which enables syntax like
// Bearshell
$`echo hello world`;
// child_process
execSync("echo hello world");
// Bearshell
await $.async`echo hello world`;
// child_process
await new Promise((resolve, reject) =>
exec("echo hello world", (error, stdout, stderr) => {
if (error) {
throw error;
} else if (stderr) {
reject(stderr);
} else {
resolve(stdout);
}
})
);
License
Licensed under MIT.