now-cli 16.1.2 (new formula)

Closes #41998.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
JounQin 2019-08-07 22:35:34 +08:00 committed by FX Coudert
parent d3d3b64446
commit d2fe971958

24
Formula/now-cli.rb Normal file
View file

@ -0,0 +1,24 @@
require "language/node"
class NowCli < Formula
desc "The command-line interface for Now"
homepage "https://zeit.co/now"
url "https://registry.npmjs.org/now/-/now-16.1.2.tgz"
sha256 "c4e2c599e99918b2e7cf1e71ae4ff06888264fb13d6656c4c0407e3608575bfc"
depends_on "node"
def install
rm Dir["dist/{*.exe,xsel}"]
inreplace "dist/index.js", "t.default=getUpdateCommand",
"t.default=async()=>'brew upgrade now-cli'"
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
system "#{bin}/now", "init", "markdown"
assert_predicate testpath/"markdown/now.json", :exist?, "now.json must exist"
assert_predicate testpath/"markdown/README.md", :exist?, "README.md must exist"
end
end