Permalink
Browse files

changed default options for Packr

git-svn-id: http://bundle-fu.googlecode.com/svn/trunk@63 1db77ec0-6337-0410-9320-454da9aca44f
  • Loading branch information...
1 parent f99b8b9 commit c13f84bedb950a94e460119e2004c9a3eb49cc30 timcharper committed Oct 31, 2007
Showing with 10 additions and 3 deletions.
  1. +10 −3 lib/bundle_fu.rb
View
@@ -24,19 +24,26 @@ def bundle_files(filenames=[])
end
def bundle_js_files(filenames=[], options={})
- output = ""
+ output =
bundle_files(filenames) { |filename, content|
if options[:compress]
if Object.const_defined?("Packr")
- # use Packr plugin (http://blog.jcoglan.com/packr/)
- Packr.new.pack(content, options[:packr_options] || {:shrink_vars => false, :base62 => true})
+ content
else
JSMinimizer.minimize_content(content)
end
else
content
end
}
+
+ if Object.const_defined?("Packr")
+ # use Packr plugin (http://blog.jcoglan.com/packr/)
+ Packr.new.pack(output, options[:packr_options] || {:shrink_vars => false, :base62 => false})
+ else
+ output
+ end
+
end
def bundle_css_files(filenames=[], options = {})

0 comments on commit c13f84b

Please sign in to comment.