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

t*: use std_npm_args #179243

Merged
merged 14 commits into from
Aug 1, 2024
4 changes: 1 addition & 3 deletions Formula/t/tailwindcss-language-server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class TailwindcssLanguageServer < Formula
desc "LSP for TailwindCSS"
homepage "https://github.com/tailwindlabs/tailwindcss-intellisense/tree/HEAD/packages/tailwindcss-language-server"
Expand All @@ -20,7 +18,7 @@ class TailwindcssLanguageServer < 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/*"]

# Replace universal binaries with their native slices
Expand Down
6 changes: 2 additions & 4 deletions Formula/t/tailwindcss.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Tailwindcss < Formula
desc "Utility-first CSS framework"
homepage "https://tailwindcss.com"
Expand All @@ -20,11 +18,11 @@ class Tailwindcss < Formula
depends_on "node" => :build

def install
system "npm", "install", *Language::Node.local_npm_install_args
system "npm", "install", *std_npm_args(prefix: false)
system "npm", "run", "build"

cd "standalone-cli" do
system "npm", "install", *Language::Node.local_npm_install_args
system "npm", "install", *std_npm_args(prefix: false)
system "npm", "run", "build"
os = OS.mac? ? "macos" : "linux"
cpu = Hardware::CPU.arm? ? "arm64" : "x64"
Expand Down
4 changes: 1 addition & 3 deletions Formula/t/terrahub.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Terrahub < Formula
desc "Terraform automation and orchestration tool"
homepage "https://docs.terrahub.io"
Expand Down Expand Up @@ -28,7 +26,7 @@ class Terrahub < 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
6 changes: 2 additions & 4 deletions Formula/t/triton.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Triton < Formula
desc "Joyent Triton CLI"
homepage "https://www.npmjs.com/package/triton"
Expand All @@ -20,9 +18,9 @@ class Triton < 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/*"]
generate_completions_from_executable(bin/"triton", "completion", shells: [:bash], shell_parameter_format: :none)
generate_completions_from_executable(bin/"triton", "completion", shells: [:bash])
end

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

class Truffle < Formula
desc "Development environment, testing framework and asset pipeline for Ethereum"
homepage "https://trufflesuite.com"
Expand All @@ -21,7 +19,7 @@ class Truffle < 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/*"]

truffle_dir = libexec/"lib/node_modules/truffle"
Expand Down
4 changes: 1 addition & 3 deletions Formula/t/typescript-language-server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class TypescriptLanguageServer < Formula
desc "Language Server Protocol implementation for TypeScript wrapping tsserver"
homepage "https://github.com/typescript-language-server/typescript-language-server"
Expand All @@ -15,7 +13,7 @@ class TypescriptLanguageServer < Formula
depends_on "typescript"

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

node_modules = libexec/"lib/node_modules"
typescript = Formula["typescript"].opt_libexec/"lib/node_modules/typescript"
Expand Down
4 changes: 1 addition & 3 deletions Formula/t/typescript.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Typescript < Formula
desc "Language for application scale JavaScript development"
homepage "https://www.typescriptlang.org/"
Expand All @@ -21,7 +19,7 @@ class Typescript < 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