homebrew-core/Formula/yarn.rb
2017-04-06 19:46:15 +02:00

23 lines
712 B
Ruby

class Yarn < Formula
desc "JavaScript package manager"
homepage "https://yarnpkg.com/"
url "https://yarnpkg.com/downloads/0.22.0/yarn-v0.22.0.tar.gz"
sha256 "e295042279b644f2bc3ea3407a2b2fb417a200d35590b0ec535422d21cf19a09"
head "https://github.com/yarnpkg/yarn.git"
bottle :unneeded
depends_on "node"
def install
libexec.install Dir["*"]
bin.install_symlink "#{libexec}/bin/yarn.js" => "yarn"
bin.install_symlink "#{libexec}/bin/yarn.js" => "yarnpkg"
inreplace "#{libexec}/package.json", '"installationMethod": "tar"', '"installationMethod": "homebrew"'
end
test do
(testpath/"package.json").write('{"name": "test"}')
system bin/"yarn", "add", "jquery"
end
end