[react-packager][streamline oss] Move open sourced JS source to react-native-github

This commit is contained in:
Spencer Ahrens committed 2015-02-19 21:25:11 -08:00
commit efae175a8e
434 files changed
+44658

No files matched your search

@@ -0,0 +1,34 @@
function ModuleDescriptor(fields) {
if (!fields.id) {
throw new Error('Missing required fields id');
}
this.id = fields.id;
if (!fields.path) {
throw new Error('Missing required fields path');
}
this.path = fields.path;
if (!fields.dependencies) {
throw new Error('Missing required fields dependencies');
}
this.dependencies = fields.dependencies;
this.resolveDependency = fields.resolveDependency;
this.entry = fields.entry || false;
this.isPolyfill = fields.isPolyfill || false;
this._fields = fields;
}
ModuleDescriptor.prototype.toJSON = function() {
return {
id: this.id,
path: this.path,
dependencies: this.dependencies
}
};
module.exports = ModuleDescriptor;