fix compressors. closes #192
This commit is contained in:
parent
f4436eb49e
commit
0b5094e953
|
@ -26,4 +26,4 @@ Feature: Minify CSS
|
|||
Scenario: Rendering external css with passthrough compressor
|
||||
Given the Server is running at "passthrough-app"
|
||||
When I go to "/stylesheets/site.css"
|
||||
Then I should see "41" lines
|
||||
Then I should see "55" lines
|
|
@ -30,7 +30,7 @@ Feature: Minify Javascript
|
|||
Scenario: Rendering external js with a passthrough minifier
|
||||
And the Server is running at "passthrough-app"
|
||||
When I go to "/javascripts/js_test.js"
|
||||
Then I should see "5" lines
|
||||
Then I should see "8" lines
|
||||
|
||||
Scenario: Rendering inline js (coffeescript) with the feature enabled
|
||||
Given "minify_javascript" feature is "enabled"
|
||||
|
@ -52,4 +52,4 @@ Feature: Minify Javascript
|
|||
Scenario: Rendering external js (coffeescript) with a passthrough minifier
|
||||
And the Server is running at "passthrough-app"
|
||||
When I go to "/javascripts/coffee_test.js"
|
||||
Then I should see "5" lines
|
||||
Then I should see "11" lines
|
|
@ -1,11 +1,11 @@
|
|||
module PassThrough
|
||||
def self.compile(data)
|
||||
module ::PassThrough
|
||||
def self.compress(data)
|
||||
data
|
||||
end
|
||||
end
|
||||
|
||||
set :js_compressor, PassThrough
|
||||
set :css_compressor, PassThrough
|
||||
set :js_compressor, ::PassThrough
|
||||
set :css_compressor, ::PassThrough
|
||||
|
||||
activate :minify_javascript
|
||||
activate :minify_css
|
||||
|
|
|
@ -39,7 +39,7 @@ module Middleman::Extensions
|
|||
first = $1
|
||||
uncompressed_source = $2
|
||||
last = $3
|
||||
minified_js = @compressor.compile(uncompressed_source)
|
||||
minified_js = @compressor.compress(uncompressed_source)
|
||||
|
||||
first << minified_js << "\n" << last
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue