Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b*: use std_npm_args #178967

Merged
merged 12 commits into from
Aug 1, 2024
5 changes: 2 additions & 3 deletions Formula/b/babel.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "language/node"
require "json"

class Babel < Formula
Expand Down Expand Up @@ -30,10 +29,10 @@ def install
buildpath.install resource("babel-cli")

cd buildpath/"node_modules/@babel/core" do
system "npm", "install", *Language::Node.local_npm_install_args, "--production"
system "npm", "install", *std_npm_args(prefix: false), "--production"
end

system "npm", "install", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

Expand Down
4 changes: 1 addition & 3 deletions Formula/b/bash-language-server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class BashLanguageServer < Formula
desc "Language Server for Bash"
homepage "https://github.com/bash-lsp/bash-language-server"
Expand All @@ -20,7 +18,7 @@ class BashLanguageServer < Formula
depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

Expand Down
4 changes: 1 addition & 3 deletions Formula/b/basti.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Basti < Formula
desc "Securely connect to RDS, Elasticache, and other AWS resources in VPCs"
homepage "https://github.com/basti-app/basti"
Expand All @@ -20,7 +18,7 @@ class Basti < Formula
depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]

# Remove incompatible pre-built binary, session-manager-plugin
Expand Down
4 changes: 1 addition & 3 deletions Formula/b/bit.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Bit < Formula
desc "Distributed Code Component Manager"
homepage "https://bit.dev"
Expand Down Expand Up @@ -31,7 +29,7 @@ class Bit < Formula
conflicts_with "bit-git", because: "both install `bit` binaries"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", *std_npm_args
bin.install_symlink libexec.glob("bin/*")

# Remove incompatible pre-built binaries
Expand Down
10 changes: 3 additions & 7 deletions Formula/b/bitwarden-cli.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class BitwardenCli < Formula
desc "Secure and free password manager for all of your devices"
homepage "https://bitwarden.com/"
Expand All @@ -25,14 +23,12 @@ class BitwardenCli < Formula
depends_on "node"

def install
Language::Node.setup_npm_environment
system "npm", "ci", "--ignore-scripts"
cli_root = buildpath/"apps/cli" # Bitwarden's source code is a monorepo
cd cli_root do
cd buildpath/"apps/cli" do
# The `oss` build of Bitwarden is a GPL backed build
system "npm", "run", "build:oss:prod", "--ignore-scripts"
cd cli_root/"build" do
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
cd "./build" do
system "npm", "install", *std_npm_args
bin.install_symlink Dir[libexec/"bin/*"]
end
end
Expand Down
4 changes: 1 addition & 3 deletions Formula/b/bower.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Bower < Formula
desc "Package manager for the web"
homepage "https://bower.io/"
Expand All @@ -23,7 +21,7 @@ class Bower < Formula
depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end

Expand Down
Loading