diff --git a/boot/bootprefix.js b/boot/bootprefix.js index bff9a2aa2..ae0712d4e 100644 --- a/boot/bootprefix.js +++ b/boot/bootprefix.js @@ -20,9 +20,15 @@ $tw = $tw || Object.create(null); $tw.boot = $tw.boot || Object.create(null); // Detect platforms -$tw.browser = typeof(window) !== "undefined" ? {} : null; -$tw.node = typeof(process) === "object" ? {} : null; -$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null; +if(!("browser" in $tw)) { + $tw.browser = typeof(window) !== "undefined" ? {} : null; +} +if(!("node" in $tw)) { + $tw.node = typeof(process) === "object" ? {} : null; +} +if(!("nodeWebKit" in $tw)) { + $tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null; +} // Set default boot tasks $tw.boot.tasks = { diff --git a/core/modules/commands/editions.js b/core/modules/commands/editions.js index 271b62e71..cc802b9f5 100644 --- a/core/modules/commands/editions.js +++ b/core/modules/commands/editions.js @@ -23,35 +23,12 @@ var Command = function(params,commander) { }; Command.prototype.execute = function() { - var fs = require("fs"), - path = require("path"), - self = this; - // Enumerate the edition paths - var editionPaths = $tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar), - editions = {}; - for(var editionIndex=0; editionIndex