function Update(options) { if (!(this instanceof Update)) { return new Update(options); } Base.call(this, options); this.is('update'); this.initUpdate(this); this.initDefaults(); } /** * Inherit `Base` */ Base.extend(Update); /** * Initialize defaults, emit events before and after */ Update.prototype.initUpdate = function() { Update.emit('update.preInit', this); Update.plugins(this); Update.emit('update.postInit', this); }; /** * Initialize `Update` defaults */
this.options = utils.merge({}, this.options, options); Core.call(this, options); this.is('assemble'); this.initDefaults(this); this.initPlugins(this); this.initCollections(this); Assemble.emit('init', this); } /** * Inherit `Core` */ Core.extend(Assemble); Core.bubble(Assemble); /** * Initialize Assemble defaults */ Assemble.prototype.initDefaults = function(app) { var exts = this.options.exts || ['md', 'hbs', 'html']; /** * Emit `preInit` on the static emitter */ Assemble.emit('preInit', this);
Assemble.call(this, options); this.is('generate'); this.initGenerate(this.options); if (!setArgs) { setArgs = true; this.base.option(utils.argv); } } /** * Extend `Generate` */ Assemble.extend(Generate); /** * Initialize Stores */ plugins.stores(Generate.prototype); /** * Initialize generate config */ Generate.prototype.initGenerate = function(opts) { debug('initializing from <%s>', __filename); Generate.emit('generate.preInit', this);