lib/classy_assets.rb in classy_assets-0.8.2 vs lib/classy_assets.rb in classy_assets-0.9.0
- old
+ new
@@ -1,29 +1,27 @@
# encoding: utf-8
-# ensure these come first to avoid tilt warnings
-require 'compass'
-require 'sass'
-require 'coffee_script'
-
# stdlib
require 'base64'
require 'escape_utils'
require 'sinatra/base'
require 'sprockets'
# classy assets components
require 'classy_assets/config'
-require 'classy_assets/errors/nil_asset_root'
-require 'classy_assets/sass/script/functions'
require 'classy_assets/sprockets'
+require 'classy_assets/sass/script/functions'
require 'classy_assets/sprockets/sass_importer'
require 'classy_assets/version'
module ClassyAssets
- # singleton sprockets environment
+ # sprockets environment
def self.sprockets
- ClassyAssets::Sprockets.instance.environment
+ if ClassyAssets.config.asset_cache
+ ClassyAssets::Sprockets.new.environment.index
+ else
+ ClassyAssets::Sprockets.new.environment
+ end
end
# singleton configuration
def self.config(&block)
yield ClassyAssets::Config.instance if block_given?