homebrew-core/Formula/gatsby-cli.rb
2019-11-13 14:46:53 -05:00

27 lines
1,003 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.8.10.tgz"
sha256 "5abb8ad8f194be371f6d99866b2031ab635d60156fbac5ab0c11763b7954d088"
bottle do
cellar :any_skip_relocation
sha256 "fadc66ee3c998db46d8566456163a73387e943f31c8ab0a9d330c2d2ee361a8b" => :catalina
sha256 "062cbc85df95c6a4a59239b616149a0e506a19052b077d0206235f9d356bb33e" => :mojave
sha256 "c4636c75a9967d564e0b11e80945477ae3dc4e3c41a2fcac32b2cebeaeb1de7d" => :high_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