From 896b8f7cf110666d90cf1879025a002f4e9dbef3 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 29 Jul 2012 23:54:52 -0700 Subject: [PATCH] Remove `noNodeClass` from "mobile" and "csp" builds. Former-commit-id: 0773f7b1c1ea637d0d519a3015d1534863a9be11 --- build.js | 11 ++++++++++- build/pre-compile.js | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 2807cf4ff..654a0e810 100755 --- a/build.js +++ b/build.js @@ -893,7 +893,7 @@ source = source.replace(/(?:\s*\/\/.*)*\n( +)if *\(value.length *=== *0[\s\S]+?\n\1}/, ''); // remove `noArgsClass` from `_.clone`, `_.isEqual`, and `_.size` - source = source.replace(/ *\|\| *\(noArgsClass *&[^)]+?\)\)/g, ''); + source = source.replace(/ *\|\| *\(noArgsClass *&&[^)]+?\)\)/g, ''); // remove `noArgsClass` from `_.isEqual` source = source.replace(/if *\(noArgsClass[^}]+?}\n/, ''); @@ -904,6 +904,15 @@ // remove `noCharByIndex` from `_.reduceRight` source = source.replace(/noCharByIndex *&&[^:]+: *([^;]+)/g, '$1'); + // remove `noNodeClass` assignment + source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *try *\{(?:\s*\/\/.*)*\n *var noNodeClass[\s\S]+?catch[^}]+}\n/, ''); + + // remove `noNodeClass` from `_.clone` + source = source.replace(/(?:\s*\/\/.*)*\n *isObj *= *!noNodeClass.+\n/, ''); + + // remove `noNodeClass` from `_.isEqual` + source = source.replace(/ *\|\| *\(noNodeClass *&&[\s\S]+?\)\)\)/, ''); + source = removeVar(source, 'extendIteratorOptions'); source = removeVar(source, 'hasDontEnumBug'); source = removeVar(source, 'iteratorTemplate'); diff --git a/build/pre-compile.js b/build/pre-compile.js index 39fb320dc..fa7b90ec9 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -277,7 +277,7 @@ .replace("') {\\n'", "'){'") // remove `useSourceURL` variable - source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *try *\{(?:\s*\/\/.*\n)* *var useSourceURL[\s\S]+?catch[^}]+}\n/, ''); + source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *try *\{(?:\s*\/\/.*)*\n *var useSourceURL[\s\S]+?catch[^}]+}\n/, ''); // remove debug sourceURL use in `_.template` source = source.replace(/(?:\s*\/\/.*\n)* *if *\(useSourceURL[^}]+}/, '');