shellcommand
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Build Status:

Master Branch:

Build Status

Overview:

ShellCommand is a child_process wrapper for Linux that enables you to execute async shell commands easily from within NodeJS.

How To:

To use ShellCommand, import the ShellCommand class and create an instance. Then use the executeAsync() function to execute the command.

If an error is encountered, the error text from the command is returned, otherwise you will get the output of the command.

Example:

// Use await with try catch or promise().then().catch();

import { ShellCommand } from 'shellcommand';
const pwd = new ShellCommand();
result = await pwd.executeAsync(`pwd`);
console.log(result); // Should return the output of pwd

Readme

Keywords

none

Package Sidebar

Install

npm i shellcommand

Weekly Downloads

0

Version

0.1.2

License

UNLICENSED

Unpacked Size

42.3 kB

Total Files

12

Last publish

Collaborators

  • davea