build: should use $(execpath) in npm_package_bin args (#34589)

This is recommended in the Bazel docs as $(location) is ambiguous and can mean either $(execpath) or $(rootpath) depending on the context.

PR Close #34589
This commit is contained in:
Greg Magolan
2020-01-08 02:08:00 -08:00
committed by atscott
parent 68e6db5d7a
commit d83071c3b1
3 changed files with 11 additions and 11 deletions

View File

@ -346,7 +346,7 @@ def rollup_bundle(name, testonly = False, **kwargs):
name + ".js",
],
args = [
"$(location :%s.es2015.js)" % name,
"$(execpath :%s.es2015.js)" % name,
"--types",
"--skipLibCheck",
"--target",
@ -355,7 +355,7 @@ def rollup_bundle(name, testonly = False, **kwargs):
"es2015,dom",
"--allowJS",
"--outFile",
"$(location :%s.js)" % name,
"$(execpath :%s.js)" % name,
],
data = [
name + ".es2015.js",
@ -377,7 +377,7 @@ def rollup_bundle(name, testonly = False, **kwargs):
name + ".es5umd.js",
],
args = [
"$(location :%s.umd.js)" % name,
"$(execpath :%s.umd.js)" % name,
"--types",
"--skipLibCheck",
"--target",
@ -386,7 +386,7 @@ def rollup_bundle(name, testonly = False, **kwargs):
"es2015,dom",
"--allowJS",
"--outFile",
"$(location :%s.es5umd.js)" % name,
"$(execpath :%s.es5umd.js)" % name,
],
data = [
name + ".umd.js",

View File

@ -416,8 +416,8 @@ def ng_rollup_bundle(name, **kwargs):
data = [name + ".min.js"],
outs = [name + ".min.js.br"],
args = [
"--output=$(location %s.min.js.br)" % name,
"$(location %s.min.js)" % name,
"--output=$(execpath %s.min.js.br)" % name,
"$(execpath %s.min.js)" % name,
],
visibility = visibility,
)
@ -439,8 +439,8 @@ def ng_rollup_bundle(name, **kwargs):
data = [name + ".min.es2015.js"],
outs = [name + ".min.es2015.js.br"],
args = [
"--output=$(location %s.min.es2015.js.br)" % name,
"$(location %s.min.es2015.js)" % name,
"--output=$(execpath %s.min.es2015.js.br)" % name,
"$(execpath %s.min.es2015.js)" % name,
],
visibility = visibility,
)