Created
June 26, 2012 15:39
-
-
Save pegli/2996514 to your computer and use it in GitHub Desktop.
postal.js and machina.js in Titanium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setting up postal and machina to work together | |
/* | |
1. Download underscore.js and the node versions of postal.js, machina.js, and machina-postal.js | |
from http://github.com/ifandelse | |
2. Change the location of underscore in the require() statements of the postal.js and machina.js | |
3. Connect machina to postal as follows: | |
*/ | |
var postal = require('lib/ifandelse/postal'), | |
machina = require('lib/ifandelse/machina'); | |
require('lib/ifandelse/machina.postal')(postal, machina); | |
/* | |
Now you can create a state machine as shown on the machina.js or machina.postal READMEs which | |
publishes events to the postal message bus. | |
*/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment