angelscripts-reactions
Adds support for scriptable reactions via angel dna
Last updated 5 years ago by outbounder .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install angelscripts-reactions 
SYNC missed versions from official npm registry.

angelabilities-reactions

Adds support for scriptable reactions via angel dna

reactions syntax

"reactions": {
  "<command pattern>": {"emit": ChemicalBody},
  "<command pattern>": {"do": ["command string"]},
  "<command pattern>": {"run": "path/to/script"}
}

angel dna

{
  "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

reaction script format

module.exports = function(angel [, next]) {
  // angel.cmdData...
}

Current Tags

  • 0.0.6                                ...           latest (5 years ago)

5 Versions

  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |