diff --git a/tools/compiler.js b/tools/compiler.js index 13d7c77d96..6fb07fb596 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -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. diff --git a/tools/isopack.js b/tools/isopack.js index 5c836319d0..4a5440149c 100644 --- a/tools/isopack.js +++ b/tools/isopack.js @@ -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; }