b62019c66b
Closes #31841. Signed-off-by: Jan Viljanen <527069+javian@users.noreply.github.com>
25 lines
961 B
Ruby
25 lines
961 B
Ruby
class Yarn < Formula
|
|
desc "JavaScript package manager"
|
|
homepage "https://yarnpkg.com/"
|
|
url "https://yarnpkg.com/downloads/1.10.0/yarn-v1.10.0.tar.gz"
|
|
sha256 "83277bd505c7f4009c13077266020c97298727de7edf67af5ca66eccae9d4632"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "node" => :recommended
|
|
|
|
conflicts_with "hadoop", :because => "both install `yarn` binaries"
|
|
|
|
def install
|
|
libexec.install Dir["*"]
|
|
(bin/"yarn").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX, :NPM_CONFIG_PYTHON => "/usr/bin/python"
|
|
(bin/"yarnpkg").write_env_script "#{libexec}/bin/yarn.js", :PREFIX => HOMEBREW_PREFIX, :NPM_CONFIG_PYTHON => "/usr/bin/python"
|
|
inreplace "#{libexec}/package.json", '"installationMethod": "tar"', '"installationMethod": "homebrew"'
|
|
end
|
|
|
|
test do
|
|
(testpath/"package.json").write('{"name": "test"}')
|
|
system bin/"yarn", "add", "jquery"
|
|
system bin/"yarn", "add", "fsevents", "--build-from-source=true"
|
|
end
|
|
end
|