WOW somehow got it to work with events being a module export

This commit is contained in:
Peter Cottle 2012-12-09 22:20:29 -08:00
parent 6327566a63
commit 7ef0d19e12
7 changed files with 70 additions and 46 deletions

View file

@ -1,5 +1,6 @@
var AnimationFactoryModule = require('./animationFactory');
var animationFactory = new AnimationFactoryModule.AnimationFactory();
var Main = require('./main');
// backbone or something uses _.uniqueId, so we make our own here
var uniqueId = (function() {
@ -23,7 +24,7 @@ function GitEngine(options) {
this.commandOptions = {};
this.generalArgs = [];
events.on('processCommand', _.bind(this.dispatch, this));
Main.getEvents().on('processCommand', _.bind(this.dispatch, this));
}
GitEngine.prototype.defaultInit = function() {