jsonlint 1.6.0 (new formula)
Installable with `npm` but widely used so let's include it. Closes #6848. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
03a3a94461
commit
85f052cd33
1 changed files with 20 additions and 0 deletions
20
Formula/jsonlint.rb
Normal file
20
Formula/jsonlint.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
require "language/node"
|
||||
|
||||
class Jsonlint < Formula
|
||||
desc "JSON parser and validator with a CLI"
|
||||
homepage "https://github.com/zaach/jsonlint"
|
||||
url "https://github.com/zaach/jsonlint/archive/v1.6.0.tar.gz"
|
||||
sha256 "a7f763575d3e3ecc9b2a24b18ccbad2b4b38154c073ac63ebc9517c4cb2de06f"
|
||||
|
||||
depends_on "node"
|
||||
|
||||
def install
|
||||
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
||||
bin.install_symlink Dir["#{libexec}/bin/*"]
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.json").write('{"name": "test"}')
|
||||
system "#{bin}/jsonlint", "test.json"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue