Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Created May 25, 2011 18:54
Show Gist options
  • Select an option

  • Save jashkenas/991633 to your computer and use it in GitHub Desktop.

Select an option

Save jashkenas/991633 to your computer and use it in GitHub Desktop.
# Try to load the compressors, if available.
compressor_map = {
:closure => 'closure-compiler',
:yui => 'yui/compressor',
:uglifier => 'uglifier',
:sass => 'sass'
}
compressor_map.each do |compressor, library|
begin
require library
rescue LoadError
Jammit.compressors.delete compressor
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment