Skip to content

Commit

Permalink
Using clean-css instead of YUI compressor
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Jul 7, 2012
1 parent 786734c commit 87bb408
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Binary file removed bin/yuicompressor-2.4.6.jar
Binary file not shown.
5 changes: 1 addition & 4 deletions lib/smart_asset.rb
Expand Up @@ -12,9 +12,6 @@ class <<self

attr_accessor :append_random, :asset_host, :asset_counter, :cache, :config, :dest, :env, :envs, :pub, :root, :sources

BIN = File.expand_path(File.dirname(__FILE__) + '/../bin')
YUI_COMPRESSOR = BIN + '/yuicompressor-2.4.6.jar'

def binary(root, relative_config=nil)
load_config root, relative_config
compress 'javascripts'
Expand Down Expand Up @@ -89,7 +86,7 @@ def compress(type)
if ext == 'js'
cmd = "uglifyjs --output #{package}#{warning} -nc #{tmp}"
elsif ext == 'css'
cmd = "java -jar #{YUI_COMPRESSOR} #{tmp} -o #{package}#{warning}"
cmd = "cleancss #{tmp} -o #{package}#{warning}"
end
puts cmd if ENV['DEBUG']
`#{cmd}`
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -2,6 +2,7 @@
"name": "smart_asset",
"version": "0.1.0",
"dependencies": {
"clean-css": "",
"uglify-js": ""
}
}

0 comments on commit 87bb408

Please sign in to comment.