Adds support for scriptable reactions via angel dna
npm install angelscripts-reactionsAdds support for scriptable reactions via angel dna
"reactions": {
"
"
"
}
{
"reactions": {
"test emit command": {
"emit": {
"type": "test"
}
},
"test do command": {
"do": "test emit command"
},
"test run command": {
"run": "relative/to/cwd/angel/reaction/script"
}
}
}
#### Given the above dna, angel used with command line
$ angel test emit command
emits Chemical {type: "test"} within angel's Plasma
$ angel test do command
does angel test emit command command.
$ angel test run command
require's and executes relative/to/cwd/angel/reaction/script
module.exports = function(angel [, next]) {
// angel.cmdData...
}