organic-spawnfilecmd

0.0.4 • Public • Published

organic-spawnfilecmd

Organelle for spawning command targeting/using file for transformations or manipulations

dna / reaction chemical

{
  data: {
    path: "full/path/to/root/folder/with/file"
  },
  "dest": "relative/path/to/cwd/as/destination/folder",
  "root": "path/to/root/folder",
  "cmd": "command to be executed with {srcfile} and {destfile} placeholders replaced",
  "name": "optional name of spawned child"
  "silent": false,
  "redirectStderrToStdout": false,
  "emitReady": false
}

reacts to dna.reactOn

In case dna.reactOn is empty, once organelle is build it uses provided dna as reaction chemical and executes cmd.

Note that having root and dest properties forces the organelle to create recursively containing folder of destfile

Emits Chemical { type: dna.emitReady, err: Error || undefined } once spawned command ends.

reacts to kill chemical type

Terminates spawned file command.

Readme

Keywords

none

Package Sidebar

Install

npm i organic-spawnfilecmd

Weekly Downloads

0

Version

0.0.4

License

MIT

Last publish

Collaborators

  • outbounder