2013-04-09 18:33:29 +00:00
|
|
|
/**
|
|
|
|
* Expose `AsteroidModule`.
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = AsteroidModule;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Module dependencies.
|
|
|
|
*/
|
|
|
|
|
2013-04-20 00:50:48 +00:00
|
|
|
var Module = require('asteroid-module-loader').Module
|
2013-04-09 18:33:29 +00:00
|
|
|
, debug = require('debug')('asteroid-module')
|
|
|
|
, util = require('util')
|
|
|
|
, inherits = util.inherits
|
|
|
|
, assert = require('assert');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new `AsteroidModule` with the given `options`.
|
|
|
|
*
|
|
|
|
* @param {Object} options
|
|
|
|
* @return {AsteroidModule}
|
|
|
|
*/
|
|
|
|
|
|
|
|
function AsteroidModule(options) {
|
|
|
|
Module.apply(this, arguments);
|
|
|
|
|
|
|
|
// throw an error if args are not supplied
|
|
|
|
assert(typeof options === 'object', 'AsteroidModule requires an options object');
|
|
|
|
|
|
|
|
debug('created with options', options);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Inherit from `Module`.
|
|
|
|
*/
|
|
|
|
|
2013-04-15 19:36:37 +00:00
|
|
|
inherits(AsteroidModule, Module);
|