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

p*: use std_npm_args #179229

Merged
merged 20 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Formula/p/pandemics.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Pandemics < Formula
desc "Converts your markdown document in a simplified framework"
homepage "https://pandemics.gitlab.io"
Expand All @@ -26,9 +24,9 @@ def install
ENV["PANDEMICS_DEPS"]="0"
# npm ignores config and ENV when in global mode so:
# - install without running the package install script
system "npm", "install", "--ignore-scripts", *Language::Node.std_npm_install_args(libexec)
system "npm", "install", "--ignore-scripts", *std_npm_args
# - call install script manually to ensure ENV is respected
system "npm", "run", "--prefix", "#{libexec}/lib/node_modules/pandemics", "install"
system "npm", "run", "--prefix", libexec/"lib/node_modules/pandemics", "install"
bin.install_symlink Dir["#{libexec}/bin/*"]
end

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

class PatchPackage < Formula
desc "Fix broken node modules instantly"
homepage "https://github.com/ds300/patch-package"
Expand All @@ -20,7 +18,7 @@ class PatchPackage < 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/p/postgraphile.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Postgraphile < Formula
desc "GraphQL schema created by reflection over a PostgreSQL schema"
homepage "https://www.graphile.org/postgraphile/"
Expand All @@ -22,7 +20,7 @@ class Postgraphile < 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/p/prettier.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Prettier < Formula
desc "Code formatter for JavaScript, CSS, JSON, GraphQL, Markdown, YAML"
homepage "https://prettier.io/"
Expand All @@ -21,7 +19,7 @@ class Prettier < 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/p/prettierd.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Prettierd < Formula
desc "Prettier daemon"
homepage "https://github.com/fsouza/prettierd"
Expand All @@ -14,7 +12,7 @@ class Prettierd < 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/p/promptfoo.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Promptfoo < Formula
desc "Test your LLM app locally"
homepage "https://promptfoo.dev/"
Expand All @@ -20,7 +18,7 @@ class Promptfoo < 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/p/pulp.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Pulp < Formula
desc "Build tool for PureScript projects"
homepage "https://github.com/purescript-contrib/pulp"
Expand All @@ -21,14 +19,14 @@ class Pulp < Formula
depends_on "purescript"

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

test do
assert_match version.to_s, shell_output("#{bin}/pulp --version")

system("#{bin}/pulp", "init")
system bin/"pulp", "init"
assert_predicate testpath/".gitignore", :exist?
assert_predicate testpath/"bower.json", :exist?
end
Expand Down
4 changes: 1 addition & 3 deletions Formula/p/purescript-language-server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class PurescriptLanguageServer < Formula
desc "Language Server Protocol server for PureScript"
homepage "https://github.com/nwolverson/purescript-language-server"
Expand All @@ -15,7 +13,7 @@ class PurescriptLanguageServer < Formula
depends_on "purescript"

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/p/pwned.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Pwned < Formula
desc "CLI for the 'Have I been pwned?' service"
homepage "https://github.com/wKovacs64/pwned"
Expand All @@ -22,7 +20,7 @@ class Pwned < Formula
conflicts_with "bash-snippets", because: "both install `pwned` binaries"

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/p/pyright.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "language/node"

class Pyright < Formula
desc "Static type checker for Python"
homepage "https://github.com/microsoft/pyright"
Expand All @@ -21,7 +19,7 @@ class Pyright < 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