From 3a0007cd18b67b07678fd4101879010869a66e3f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 29 Aug 2012 01:17:28 -0700 Subject: [PATCH] Remove pseudo private properties from debug builds. Former-commit-id: 839c2e47e19ba163f0c69d3c115ec9ee262d5d6b --- build.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index 1ef5555bd..f10bad5be 100755 --- a/build.js +++ b/build.js @@ -1082,6 +1082,9 @@ source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *var hasObjectSpliceBug;|.+?hasObjectSpliceBug *=.+/g, ''); } + // remove pseudo private properties + source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n'); + // assign debug source before further modifications that rely on the minifier // to remove unused variables and other dead code debugSource = source; @@ -1136,9 +1139,6 @@ source = source.replace(/ *\(function\(\) *{[\s\S]+?}\(1\)\);/, ''); } - // remove pseudo private properties - source = source.replace(/(?:(?:\s*\/\/.*)*\s*lodash\._[^=]+=.+\n)+/g, '\n'); - // consolidate consecutive horizontal rule comment separators source = source.replace(/(?:\s*\/\*-+\*\/\s*){2,}/g, function(separators) { return separators.match(/^\s*/)[0] + separators.slice(separators.lastIndexOf('/*'));