Created
November 30, 2010 18:54
-
-
Save revelation/722169 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
comp = goog.compile(%w{ | |
--summary_detail_level 3 | |
--ns rev.wysiwyg | |
--ns rev.scheduler.Base | |
--ns rev.scheduler.Model | |
--ns rev.dropdown | |
--warning_level VERBOSE | |
--externs datasource.externs | |
--externs ../jquery-1.4.2.externs | |
--externs ../jquery.ui.widget.externs | |
--js_output_file ../../../public/javascripts/researcher.js | |
--compilation_level ADVANCED_OPTIMIZATIONS | |
}) | |
if !comp.stderr or comp.stderr.empty? | |
@response = comp.to_response | |
else -%> | |
<% err_str = comp.stderr.split("\n").last; if err_str.to_i > 0 -%> | |
try{console.error(<%= ('Closure Compiler: '+err_str).dump %>)}catch(err){} | |
<% end -%> | |
try{console.log(<%= comp.stderr.dump %>)}catch(err){} | |
<%= comp %> | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment