Skip to content

Latest commit

History

History
36 lines (23 loc) 路 631 Bytes

execa-command.md

File metadata and controls

36 lines (23 loc) 路 631 Bytes

ExecaCommand

An abstract class with a method to execute a subprocess using execa.

Options

Type: object literal

Optional properties are denoted by *
silent*

Type: boolean
Default: true

Whether to output a subprocess stdout / stderr (useful for debuging)

workingDirectory

Type: string

Example

const { ExecaCommand } = require("@abstracter/atomic-release/commands");

class MoveCommand extends ExecCommand {
  async do() {
    await this.execa("mv", ["a", "b"]);
  }
  
  async undo() {
    await this.execa("mv", ["b", "a"]);
  }
}