diff options
| author | Vikhyat Korrapati | 2012-12-28 02:03:41 +0530 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-12-29 09:42:15 -0800 |
| commit | 17c09a8a9008e456f0e1430a5a964a1321dd38d0 (patch) | |
| tree | d223effdcc55a04d97e92ad33c0ecee9a47a55e1 /Library/Formula | |
| parent | ec7c8336b319b61591ca023dd970728beea6b1f5 (diff) | |
| download | homebrew-17c09a8a9008e456f0e1430a5a964a1321dd38d0.tar.bz2 | |
htmlcompressor: Add Closure Compiler support
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/htmlcompressor.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Formula/htmlcompressor.rb b/Library/Formula/htmlcompressor.rb index 08049f8b2..13f37e837 100644 --- a/Library/Formula/htmlcompressor.rb +++ b/Library/Formula/htmlcompressor.rb @@ -6,8 +6,10 @@ class Htmlcompressor < Formula sha1 '57db73b92499e018b2f2978f1c7aa7b1238c7a39' option 'yuicompressor', "Use YUICompressor for JS/CSS compression" + option 'closure-compiler', "Use Closure Compiler for JS optimization" depends_on "yuicompressor" => :optional if build.include? 'yuicompressor' + depends_on "closure-compiler" => :optional if build.include? 'closure-compiler' def install libexec.install "htmlcompressor-1.5.3.jar" @@ -18,5 +20,10 @@ class Htmlcompressor < Formula yui_jar = "yuicompressor-#{yui.version}.jar" ln_s "#{yui.libexec}/#{yui_jar}", "#{libexec}/#{yui_jar}" end + + if build.include? 'closure-compiler' + closure = Formula.factory('closure-compiler') + ln_s "#{closure.libexec}/build/compiler.jar", "#{libexec}/compiler.jar" + end end end |
