Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #41998. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |