Skip to content

Instantly share code, notes, and snippets.

@revelation
Created November 30, 2010 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revelation/722169 to your computer and use it in GitHub Desktop.
Save revelation/722169 to your computer and use it in GitHub Desktop.
<%
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