Skip to content

rubber-duck-software/bearshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐻

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.

About

A bearbones api for shell scripting in Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published