Skip to content

Instantly share code, notes, and snippets.

@hassox
Created May 17, 2011 22:58
Show Gist options
  • Select an option

  • Save hassox/977604 to your computer and use it in GitHub Desktop.

Select an option

Save hassox/977604 to your computer and use it in GitHub Desktop.
class AssetServer < Sprockets::Environment
include Singleton
def initialize
super Rails.root.join('app', 'assets')
paths << 'javascripts' << 'stylesheets'
self.static_root = Rails.root.join('public', 'assets')
if Rails.env.production? || Rails.env.beta?
self.js_compressor = YUI::JavaScriptCompressor.new :munge => true, :optimize => true
self.css_compressor = YUI::CssCompressor.new
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment