diff --git a/Formula/htmlcompressor.rb b/Formula/htmlcompressor.rb
index 6ffc21d87e..28d110b167 100644
--- a/Formula/htmlcompressor.rb
+++ b/Formula/htmlcompressor.rb
@@ -5,22 +5,25 @@ class Htmlcompressor < Formula
url 'https://htmlcompressor.googlecode.com/files/htmlcompressor-1.5.3.jar'
sha1 '57db73b92499e018b2f2978f1c7aa7b1238c7a39'
- option 'yuicompressor', "Use YUICompressor for JS/CSS compression"
- option 'closure-compiler', "Use Closure Compiler for JS optimization"
+ option "with-yuicompressor", "Use YUICompressor for JS/CSS compression"
+ option "with-closure-compiler", "Use Closure Compiler for JS optimization"
- depends_on "yuicompressor" if build.include? 'yuicompressor'
- depends_on "closure-compiler" if build.include? 'closure-compiler'
+ deprecated_option "yuicompressor" => "with-yuicompressor"
+ deprecated_option "closure-compiler" => "with-closure-compiler"
+
+ depends_on "yuicompressor" => :optional
+ depends_on "closure-compiler" => :optional
def install
libexec.install "htmlcompressor-#{version}.jar"
bin.write_jar_script libexec/"htmlcompressor-#{version}.jar", "htmlcompressor"
- if build.include? 'yuicompressor'
+ if build.with? "yuicompressor"
yui = Formula["yuicompressor"]
libexec.install_symlink yui.opt_libexec/"yuicompressor-#{yui.version}.jar"
end
- if build.include? 'closure-compiler'
+ if build.with? "closure-compiler"
libexec.install_symlink Formula["closure-compiler"].opt_libexec/"build/compiler.jar"
end
end