-
Notifications
You must be signed in to change notification settings - Fork 0
Ruby wrapper for the YUI Compressor.
coryodaniel/ruby-yui
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ruby-yui is a ruby wrapper for the YUI Compressor. ==== Install Thor Tasks thor install http://github.com/coryodaniel/ruby-yui/raw/master/task.thor ==== Usage # this also takes a options hash, defaults are stated below yui = Yui.new "./path/to/javascripts" yui = Yui.new "./path/to/javascripts", :out_path => "./public/javascripts" yui = Yui.new "./path/to/javascripts/application.js" yui = Yui.new "./path/to/javascripts/*.my.cool.glob.*.js" # to compress yui.minify Yui.compress_string("alert('hello world');") # => true|false if 100% of files where minified # to compress & bundle yui.bundle # => path to bundle OR nil if failed to bundle ==== Quick Usage # This does the same thing as instantiating a Yui object and calling minify # it also takes the same params hash Yui.compress "./test/data/javascripts" # => true|false ==== Default Options :clobber => false, :java_cli => "java -jar", :yui_jar => File.join(YUI_ROOT,"ext","yuicompressor-2.4.2.jar"), :suffix => "yui-min", :out_path => nil, #file_path.sub(inpath,outpath) :type => :js, :charset => nil, :preserve_semi => false, :disable_opt => false, :nomunge => false
About
Ruby wrapper for the YUI Compressor.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published