@ethronpi/exec

0.2.0 • Public • Published

@ethronpi/exec

NPM version Total downloads

Ethron.js plugin for executing commands from the shell.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by EthronLabs.

Use

const exec = require("@ethronpi/exec");

exec task

This task runs a command from the shell:

exec({cmd, bg, status, env, workDir})
exec(cmd)
  • cmd (string, required). Command to run.
  • detach (bool). Must the command be executed in background? Default: false.
  • status (number, string or number[]). Exit code(s) to wait. Default: 0. If any, status not considered.
  • env (object). Environment variables.
  • workDir (string). Work directory.

Example:

exec({cmd: "luacheck .", status: 0})
exec({cmd: "luacheck .", status: "any"})
exec({cmd: "luarocks make --local", status: [0, 1]})

/@ethronpi/exec/

    Package Sidebar

    Install

    npm i @ethronpi/exec

    Weekly Downloads

    2

    Version

    0.2.0

    License

    none

    Unpacked Size

    5.13 kB

    Total Files

    4

    Last publish

    Collaborators

    • ethronpi