Module: Sinatra::Minify
- Defined in:
- lib/sinatra/minify.rb,
lib/sinatra/minify/config.rb,
lib/sinatra/minify/helpers.rb,
lib/sinatra/minify/package.rb,
lib/sinatra/minify/compressor.rb
Defined Under Namespace
Modules: Helpers
Classes: Compressor, Config, Package
Constant Summary
collapse
- GlobNoMatchError =
Class.new(StandardError)
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.registered(app) ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/sinatra/minify.rb', line 20
def self.registered( app )
app.helpers Helpers
app.set :js_url, '/js' app.set :js_path, '/public/js' app.set :css_url, '/css'
app.set :css_path, '/public/css'
app.set :minify_config, 'config/assets.yml'
app.disable :force_minify
end
|
Instance Method Details
#minify? ⇒ Boolean
30
31
32
|
# File 'lib/sinatra/minify.rb', line 30
def minify?
production? or force_minify
end
|