From 380105ad6fc59f69c5bfe7173f9413ebe6f361cf Mon Sep 17 00:00:00 2001 From: Ram Kaniyur Date: Wed, 16 Dec 2015 15:22:18 +1100 Subject: [PATCH 1/2] Allow Closure Compiler name mangling. --- lib/compile-exports.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compile-exports.js b/lib/compile-exports.js index 06904fac..c84b72d2 100644 --- a/lib/compile-exports.js +++ b/lib/compile-exports.js @@ -14,12 +14,12 @@ module.exports = function compileExports(result, importItemMatcher, camelCaseKey var exportJs = Object.keys(result.exports).reduce(function(res, key) { var valueAsString = JSON.stringify(result.exports[key]); valueAsString = valueAsString.replace(result.importItemRegExpG, importItemMatcher); - res.push("\t" + JSON.stringify(key) + ": " + valueAsString); + res.push("\t" + key + ": " + valueAsString); if (camelCaseKeys === true) { - res.push("\t" + JSON.stringify(camelCase(key)) + ": " + valueAsString); + res.push("\t" + camelCase(key) + ": " + valueAsString); } else if (camelCaseKeys === 'dashes') { - res.push("\t" + JSON.stringify(dashesCamelCase(key)) + ": " + valueAsString); + res.push("\t" + dashesCamelCase(key) + ": " + valueAsString); } return res; From d1cb3c92a86231fdd08e30b7bd00906239e67a88 Mon Sep 17 00:00:00 2001 From: Ram Kaniyur Date: Wed, 16 Dec 2015 15:29:33 +1100 Subject: [PATCH 2/2] Update compile-exports.js --- lib/compile-exports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compile-exports.js b/lib/compile-exports.js index c84b72d2..5fd197c4 100644 --- a/lib/compile-exports.js +++ b/lib/compile-exports.js @@ -14,7 +14,7 @@ module.exports = function compileExports(result, importItemMatcher, camelCaseKey var exportJs = Object.keys(result.exports).reduce(function(res, key) { var valueAsString = JSON.stringify(result.exports[key]); valueAsString = valueAsString.replace(result.importItemRegExpG, importItemMatcher); - res.push("\t" + key + ": " + valueAsString); + res.push("\t" + JSON.stringify(key) + ": " + valueAsString); if (camelCaseKeys === true) { res.push("\t" + camelCase(key) + ": " + valueAsString);