2011-03-10 05:11:03 +00:00
|
|
|
class Jsmin < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Minify JavaScript code"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://www.crockford.com/javascript/jsmin.html"
|
|
|
|
url "https://github.com/douglascrockford/JSMin/archive/1bf6ce5f74a9f8752ac7f5d115b8d7ccb31cfe1b.tar.gz"
|
|
|
|
version "2013-03-29"
|
|
|
|
sha256 "aae127bf7291a7b2592f36599e5ed6c6423eac7abe0cd5992f82d6d46fe9ed2d"
|
2010-11-09 17:49:48 +00:00
|
|
|
|
|
|
|
def install
|
2015-08-03 12:55:31 +00:00
|
|
|
system ENV.cc, "jsmin.c", "-o", "jsmin"
|
|
|
|
bin.install "jsmin"
|
2010-11-09 17:49:48 +00:00
|
|
|
end
|
2014-02-12 04:49:36 +00:00
|
|
|
|
|
|
|
test do
|
2014-05-04 19:12:41 +00:00
|
|
|
assert_equal "\nvar i=0;", pipe_output(bin/"jsmin", "var i = 0; // comment")
|
2014-02-12 04:49:36 +00:00
|
|
|
end
|
2010-11-09 17:49:48 +00:00
|
|
|
end
|