justo.plugin.cli

1.0.0-alpha2.7 • Public • Published

justo.plugin.cli

Justo plugin for running commands from the shell. This is local and SSH-compatible.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by Justo Labs.

Use

const cli = require("justo.plugin.cli");

cli task

This task runs a command from the shell:

cli({cmd, bg, status, env, wd})
  • 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. Only when local.
  • wd or workDir (string). Work directory. Only when local.

Example:

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

Readme

Keywords

none

Package Sidebar

Install

npm i justo.plugin.cli

Homepage

justo.rocks

Weekly Downloads

10

Version

1.0.0-alpha2.7

License

none

Unpacked Size

4.77 kB

Total Files

4

Last publish

Collaborators

  • justojs