lib/classy_assets/tasks.rb in classy_assets-0.8.2 vs lib/classy_assets/tasks.rb in classy_assets-0.9.0

- old
+ new

@@ -2,19 +2,19 @@ require 'rake' require 'rake/sprocketstask' require 'classy_assets' -class Rake::ClassyAssetsTask < Rake::SprocketsTask - def define_precompile - desc "Precompile assets" - task "assets:precompile" => [:assets] - end +module ClassyAssets + class Tasks < Rake::SprocketsTask ; end end Rake::ClassyAssetsTask.new do |t| - ClassyAssets.config.asset_compress = true + if ClassyAssets.config.asset_compress + ClassyAssets.sprockets.css_compressor = ClassyAssets.config.css_compressor + ClassyAssets.sprockets.js_compressor = ClassyAssets.config.css_compressor + end + t.environment = ClassyAssets.sprockets t.output = ClassyAssets.config.asset_precompile_folder t.assets = ClassyAssets.config.asset_precompile_files - t.define_precompile end