public
Description: Ruby wrapper for the YUI Compressor.
Homepage: http://github.com/coryodaniel/ruby-yui
Clone URL: git://github.com/coryodaniel/ruby-yui.git
ruby-yui / task.thor
100755 20 lines (18 sloc) 0.425 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'ruby-yui'
class RubyYui < Thor
  desc "minify PATH", "Minify all javascript in the path"
  def minify(path)
    yui = Yui.new path
    yui.minify
  end
  
  desc "bundle PATH", "Minify and bundle all javascript in the path"
  def bundle(path)
    yui = Yui.new path
    yui.bundle
  end
  
  desc "clobber PATH", "Clobber ruby-yui generated files"
  def clobber(path)
    yui = Yui.new path
    yui.clobber
  end
end