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.
46 lines (35 loc) • 1.24 kB
JavaScript
define.Class(
'raptor/optimizer/PageConfig',
['raptor'],
function(raptor, require) {
"use strict";
var PageConfig = function() {
this.name = null;
this.bundleSetConfig = null;
this.packageManifest = null;
};
PageConfig.prototype = {
getBundleSetConfig: function() {
return this.bundleSetConfig;
},
addBundleSetConfig: function(bundleSetConfig) {
if (this.bundleSetConfig) {
throw raptor.createError(new Error('Page "' + this.name + '" already has bundles defined"'));
}
this.bundleSetConfig = bundleSetConfig;
},
setPackageManifest: function(packageManifest) {
this.packageManifest = packageManifest;
},
getPackageManifest: function() {
return this.packageManifest;
},
getName: function() {
return this.name;
},
toString: function() {
return "[PageConfig name=" + this.name + "]";
}
};
return PageConfig;
});