From c9b41a4996aae51b9fc5108f523cca26f02e9047 Mon Sep 17 00:00:00 2001 From: Mike Frawley Date: Tue, 23 Feb 2010 18:13:46 -0600 Subject: [PATCH] modify rakefile build_advanced to strip off my call to _.initWrapper() --- Rakefile | 2 +- underscore.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 2c085058a..1b5d91615 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,7 @@ task :build_advanced do # remove wrapping anonymous function as this messes with closure compiler # see # http://groups.google.com/group/closure-compiler-discuss/browse_thread/thread/b59b54c1a0073aa5 - js.sub!('(function() {', '').chomp!("})();\n") + js.sub!('(function() {', '').chomp!("_.initWrapper();\n})();\n") compiler = Closure::Compiler.new \ :compilation_level => 'ADVANCED_OPTIMIZATIONS', :formatting => 'PRETTY_PRINT' diff --git a/underscore.js b/underscore.js index 53d70c503..6260b57b8 100644 --- a/underscore.js +++ b/underscore.js @@ -697,5 +697,6 @@ }; } + // For backwards compatability, init the OO wrapper _.initWrapper(); })();