Skip to content

Instantly share code, notes, and snippets.

@cdlm
Created December 23, 2010 22:33
Show Gist options
  • Save cdlm/753639 to your computer and use it in GitHub Desktop.
Save cdlm/753639 to your computer and use it in GitHub Desktop.
nanoc3 filter wrapping the google closure compiler
class ClosureCompiler < Nanoc3::Filter
identifier :closure_compiler
def run(content, params={})
IO.popen("closure --third_party true --warning_level QUIET", 'r+') do |io|
io.write content
io.close_write
io.read
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment