Compress css in production mode
This commit is contained in:
parent
99edd9f0df
commit
e8ce5020a4
|
@ -72,7 +72,14 @@ output 'public/styles'
|
|||
input assets.styles do
|
||||
match '**/*.{scss,sass}' do
|
||||
sass
|
||||
concat [], 'app.css'
|
||||
concat [], ['app.css', 'min/app.css']
|
||||
end
|
||||
|
||||
if assets.production?
|
||||
match "min/app.css" do
|
||||
yui_css :jar_file => File.expand_path('../vendor/yuicompressor-2.4.7.jar', __FILE__)
|
||||
concat 'app.min.css'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -17,6 +17,7 @@ group :assets do
|
|||
gem 'compass'
|
||||
gem 'tilt'
|
||||
gem 'uglifier'
|
||||
gem 'yui-compressor'
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
|
|
|
@ -18,6 +18,10 @@ GIT
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
POpen4 (0.1.4)
|
||||
Platform (>= 0.4.0)
|
||||
open4
|
||||
Platform (0.4.0)
|
||||
backports (2.6.5)
|
||||
chunky_png (1.2.6)
|
||||
coderay (1.0.8)
|
||||
|
@ -62,6 +66,7 @@ GEM
|
|||
method_source (0.8.1)
|
||||
mime-types (1.19)
|
||||
multi_json (1.5.0)
|
||||
open4 (1.3.0)
|
||||
pry (0.9.10)
|
||||
coderay (~> 1.0.5)
|
||||
method_source (~> 0.8)
|
||||
|
@ -116,6 +121,8 @@ GEM
|
|||
execjs (>= 0.3.0)
|
||||
multi_json (~> 1.0, >= 1.0.2)
|
||||
ya2yaml (0.31)
|
||||
yui-compressor (0.9.6)
|
||||
POpen4 (>= 0.1.4)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -144,3 +151,4 @@ DEPENDENCIES
|
|||
sinatra-contrib
|
||||
tilt
|
||||
uglifier
|
||||
yui-compressor
|
||||
|
|
BIN
vendor/yuicompressor-2.4.7.jar
vendored
Normal file
BIN
vendor/yuicompressor-2.4.7.jar
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user