diff --git a/src/core/verb.js b/src/core/verb.js index 0739103..ed4e6a8 100644 --- a/src/core/verb.js +++ b/src/core/verb.js @@ -11,7 +11,9 @@ Definition of the Verb class. // Use J. Resig's nifty class implementation - var Class = require( '../utils/class' ); + var Class = require( '../utils/class' ) + , EVENTS = require('events'); + @@ -21,8 +23,14 @@ Definition of the Verb class. */ var Verb = module.exports = Class.extend({ + init: function() { + this.emitter = new EVENTS.EventEmitter(); + }, + + on: function() { + this.emitter.on.apply( this.emitter, arguments ); + } + }); - - }()); diff --git a/src/verbs/build.js b/src/verbs/build.js index 826507f..834fb09 100644 --- a/src/verbs/build.js +++ b/src/verbs/build.js @@ -32,6 +32,10 @@ Implementation of the 'generate' verb for HackMyResume. var BuildVerb = module.exports = Verb.extend({ + init: function() { + this._super(); + }, + invoke: function() { build.apply( this, arguments ); }