0.0.2 • Published 2 years ago

bearshell v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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.

0.0.2

2 years ago

0.0.1

2 years ago