homebrew-core/Formula/gatsby-cli.rb
2019-08-07 09:04:05 +08:00

27 lines
1,001 B
Ruby

require "language/node"
class GatsbyCli < Formula
desc "Gatsby command-line interface"
homepage "https://www.gatsbyjs.org/docs/gatsby-cli/"
url "https://registry.npmjs.org/gatsby-cli/-/gatsby-cli-2.7.28.tgz"
sha256 "d0d31e07e06f5708096b474123f2c94eece9275b72c584538861cc22ecb7863a"
bottle do
cellar :any_skip_relocation
sha256 "47f185d74b1f8c067cae92f57fb281638c64d4a5c9b4544e85074769af212c4e" => :mojave
sha256 "9bbf881e1896dfb68cb4dad35a383e7f3c9f5cc96c447e29bac5f399289f11d0" => :high_sierra
sha256 "40c85117ea5642f8b961b0f3a2418d3b9e89ef80db25fcea4a67502f69056a26" => :sierra
end
depends_on "node"
def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
system bin/"gatsby", "new", "hello-world", "https://github.com/gatsbyjs/gatsby-starter-hello-world"
assert_predicate testpath/"hello-world/package.json", :exist?, "package.json was not cloned"
end
end