formula: add std_npm_args
This commit is contained in:
parent
df27448ea7
commit
959bf283ae
@ -1847,6 +1847,16 @@ class Formula
|
|||||||
["--prefix=#{prefix}", "--libdir=#{lib}", "--buildtype=release", "--wrap-mode=nofallback"]
|
["--prefix=#{prefix}", "--libdir=#{lib}", "--buildtype=release", "--wrap-mode=nofallback"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Standard parameters for npm builds.
|
||||||
|
sig { params(prefix: T.any(String, Pathname, FalseClass)).returns(T::Array[String]) }
|
||||||
|
def std_npm_args(prefix: libexec)
|
||||||
|
require "language/node"
|
||||||
|
|
||||||
|
return Language::Node.std_npm_install_args(Pathname(prefix)) if prefix
|
||||||
|
|
||||||
|
Language::Node.local_npm_install_args
|
||||||
|
end
|
||||||
|
|
||||||
# Standard parameters for pip builds.
|
# Standard parameters for pip builds.
|
||||||
sig {
|
sig {
|
||||||
params(prefix: T.any(String, Pathname, FalseClass),
|
params(prefix: T.any(String, Pathname, FalseClass),
|
||||||
@ -2964,6 +2974,8 @@ class Formula
|
|||||||
pretty_args -= std_go_args
|
pretty_args -= std_go_args
|
||||||
when "meson"
|
when "meson"
|
||||||
pretty_args -= std_meson_args
|
pretty_args -= std_meson_args
|
||||||
|
when "npm"
|
||||||
|
pretty_args -= std_npm_args
|
||||||
when %r{(^|/)(pip|python)(?:[23](?:\.\d{1,2})?)?$}
|
when %r{(^|/)(pip|python)(?:[23](?:\.\d{1,2})?)?$}
|
||||||
pretty_args -= std_pip_args
|
pretty_args -= std_pip_args
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user