aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/jsmin.rb
blob: 3a16ea44d94bc8a7158a1c91fbc58e969c5cac48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'formula'

class Jsmin < Formula
  homepage 'http://www.crockford.com/javascript/jsmin.html'
  url 'https://github.com/douglascrockford/JSMin/archive/1bf6ce5f74a9f8752ac7f5d115b8d7ccb31cfe1b.tar.gz'
  version '2013-03-29'
  sha1 '8330fa182c283d5cc3fefcfb412bba662c0e2ee9'

  def install
    system ENV.cc, 'jsmin.c', '-o', 'jsmin'
    bin.install 'jsmin'
  end

  test do
    assert_equal "\nvar i=0;", pipe_output(bin/"jsmin", "var i = 0; // comment")
  end
end