execcommand@1.0.0

execcommand@1.0.0

Component to perform commands like you run them in the bash console.

By @mantradev

Install with:

$ mantrad download-component execcommand@1.0.0

Or install last version with:

$ mantrad download-component execcommand

README.md

execcommand component

Simple Mantra component to run bash commands programmatically with the API its exposes.

API Mantra.api.execcommand.exec

async Mantra.api.execcommand.exec(command)

Performs the command indicated as parameter. Raises an exception if something goes wrong.

Example

You can any command as you run it in the bash console.

This example runs a "tar" command with the component:

const tarCommand = getTarCommand();

await Mantra.api.execcommand.exec( tarCommand );