Created
November 25, 2017 20:46
-
-
Save chrmoritz/a572e5efca056d4dcff43ba376740bed to your computer and use it in GitHub Desktop.
Homebrew Formula of yarn installing a test build of my homebrew-node-gyp branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Yarn < Formula | |
desc "JavaScript package manager" | |
homepage "https://yarnpkg.com/" | |
url "https://github.com/chrmoritz/yarn/releases/download/v1.3.2/yarn-v1.3.2.tar.gz" | |
sha256 "df9ab3a21ba62ed57fc68c592b4d0000b762739ee4d80566f293187705b6f12b" | |
revision 42 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment