homebrew-core/Formula/yarn.rb
Daniel15's Build Bot 835c5dadb3 yarn 1.2.0 (#19262)
2017-10-10 00:40:58 -07:00

22 lines
737 B
Ruby

class Yarn < Formula
desc "JavaScript package manager"
homepage "https://yarnpkg.com/"
url "https://yarnpkg.com/downloads/1.2.0/yarn-v1.2.0.tar.gz"
sha256 "533cf428a5a354d8393864d31451478a850bb7c173d8d756553898041963c949"
bottle :unneeded
depends_on "node" => :recommended
def install
libexec.install Dir["*"]
(bin/"yarn").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX
(bin/"yarnpkg").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX
inreplace "#{libexec}/package.json", '"installationMethod": "tar"', '"installationMethod": "homebrew"'
end
test do
(testpath/"package.json").write('{"name": "test"}')
system bin/"yarn", "add", "jquery"
end
end