raptor
Version:
RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.
34 lines (29 loc) • 936 B
JavaScript
define.Class(
'raptor/optimizer/BundleSetConfig',
['raptor'],
function(raptor, require) {
"use strict";
var nextId = 0;
var BundleSetConfig = function(config) {
if (!config) {
config = {};
}
this._id = nextId++;
this.name = config.name;
this.ref = config.ref;
this.enabled = config.enabled !== false;
this.children = [];
};
BundleSetConfig.prototype = {
addChild: function(child) {
this.children.push(child);
},
toString: function() {
return "[BundleSetConfig name=" + this.name + "]";
},
forEachChild: function(callback, thisObj) {
raptor.forEach(this.children, callback, thisObj);
}
};
return BundleSetConfig;
});