lib/jammit/packager.rb in jammit-0.2.7 vs lib/jammit/packager.rb in jammit-0.2.8

- old
+ new

@@ -16,11 +16,11 @@ # Creating a new Packager will rebuild the list of assets from the # Jammit.configuration. When assets.yml is being changed on the fly, # create a new Packager. def initialize @compressor = Compressor.new - @force = true + @force = false @config = { :css => (Jammit.configuration[:stylesheets] || {}).symbolize_keys, :js => (Jammit.configuration[:javascripts] || {}).symbolize_keys, :jst => (Jammit.configuration[:templates] || {}).symbolize_keys } @@ -35,10 +35,10 @@ # versions. In order to prebuild the MHTML stylesheets, we need to know the # base_url, because IE only supports MHTML with absolute references. # Unless forced, will only rebuild assets whose source files have been # changed since their last package build. def precache_all(output_dir=nil, base_url=nil) - output_dir ||= "#{ASSET_ROOT}/public/#{Jammit.package_path}" + output_dir ||= File.join(PUBLIC_ROOT, Jammit.package_path) cacheable(:js, output_dir).each {|p| cache(p, 'js', pack_javascripts(p), output_dir) } cacheable(:jst, output_dir).each {|p| cache(p, 'jst', pack_templates(p), output_dir) } cacheable(:css, output_dir).each do |p| cache(p, 'css', pack_stylesheets(p), output_dir) if Jammit.embed_images \ No newline at end of file