Read and write debugOnly flag in isopack

This commit is contained in:
David Glasser
2014-10-07 17:15:52 -07:00
parent f78184c497
commit 9bf291c8a0
2 changed files with 8 additions and 1 deletions

View File

@@ -1106,7 +1106,8 @@ compiler.compile = function (packageSource, options) {
cordovaDependencies: packageSource.cordovaDependencies,
buildTimeDirectDependencies: buildTimeDeps.directDependencies,
buildTimePluginDependencies: buildTimeDeps.pluginDependencies,
includeTool: packageSource.includeTool
includeTool: packageSource.includeTool,
debugOnly: packageSource.debugOnly
});
// Compile unibuilds. Might use our plugins, so needs to happen second.

View File

@@ -235,6 +235,7 @@ var Isopack = function () {
self.version = null;
self.earliestCompatibleVersion = null;
self.isTest = false;
self.debugOnly = false;
// Unibuilds, an array of class Unibuild.
self.unibuilds = [];
@@ -317,6 +318,7 @@ _.extend(Isopack.prototype, {
self.buildTimeDirectDependencies = options.buildTimeDirectDependencies;
self.buildTimePluginDependencies = options.buildTimePluginDependencies;
self.includeTool = options.includeTool;
self.debugOnly = options.debugOnly;
},
// Programmatically add a unibuild to this Isopack. Should only be
@@ -626,6 +628,7 @@ _.extend(Isopack.prototype, {
self.version = mainJson.version;
self.earliestCompatibleVersion = mainJson.earliestCompatibleVersion;
self.isTest = mainJson.isTest;
self.debugOnly = !!mainJson.debugOnly;
}
_.each(mainJson.plugins, function (pluginMeta) {
rejectBadPath(pluginMeta.path);
@@ -765,6 +768,9 @@ _.extend(Isopack.prototype, {
plugins: []
};
if (self.debugOnly) {
mainJson.debugOnly = true;
}
if (! _.isEmpty(self.cordovaDependencies)) {
mainJson.cordovaDependencies = self.cordovaDependencies;
}