From 6ea969b9872d6d7b188c6a93797c3df91c8c407f Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 8 Sep 2015 14:46:05 +0000 Subject: [PATCH 1/2] fix mode packaging --- plugins/c9.static/cdn.cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.static/cdn.cli.js b/plugins/c9.static/cdn.cli.js index 05a0ee01..3060df0e 100644 --- a/plugins/c9.static/cdn.cli.js +++ b/plugins/c9.static/cdn.cli.js @@ -171,7 +171,7 @@ define(function(require, exports, module) { var packages = [ "ace", - "plugins/c9.ide.salesforce/salesforce.language", + "plugins/salesforce.language", ]; function readPackage(name, type, excludePattern) { From 70194ede7fef4c29c3db5d9e61894e7b595dcefd Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 8 Sep 2015 19:49:49 +0400 Subject: [PATCH 2/2] include modes from externalPlugins in the build --- plugins/c9.static/cdn.cli.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/plugins/c9.static/cdn.cli.js b/plugins/c9.static/cdn.cli.js index 3060df0e..3dda4d00 100644 --- a/plugins/c9.static/cdn.cli.js +++ b/plugins/c9.static/cdn.cli.js @@ -167,24 +167,33 @@ define(function(require, exports, module) { var pathMap = { "ace": __dirname + "/../../node_modules/ace/lib/ace", "plugins": __dirname + "/../../plugins", + "plugins/salesforce.language": __dirname + "/../../node_modules/salesforce.language" }; var packages = [ "ace", "plugins/salesforce.language", ]; + + function toFsPath(id) { + var testPath = id, tail = ""; + while (testPath) { + if (pathMap[testPath]) + return pathMap[testPath] + tail; + var i = testPath.lastIndexOf("/"); + if (i === -1) break; + tail = testPath.substr(i) + tail; + testPath = testPath.slice(0, i); + } + throw new Error("Cannot map path " + id); + } function readPackage(name, type, excludePattern) { if (!excludePattern) excludePattern = /_test/; - var prefix = name.split("/")[0]; var targetPath = name + "/" + type; - - if (!pathMap[prefix]) - throw new Error("Cannot map prefix " + prefix + " for package " + name); - - var sourcePath = pathMap[prefix] + "/" + targetPath.substr(prefix.length); + var sourcePath = toFsPath(targetPath); try { var files = fs.readdirSync(sourcePath);