0.0.4 • Published 9 years ago

organic-spawnfilecmd v0.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

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.