ea4278754c
* chore: fix spelling in .circleci Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in BUILD.gn Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in appveyor.yml Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in build Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in docs Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in lib Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in script Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in shell Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in spec Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * chore: fix spelling in spec-main Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
template("npm_action") {
|
|
assert(defined(invoker.script),
|
|
"Need script name to run (must be defined in package.json)")
|
|
assert(defined(invoker.args), "Need script arguments")
|
|
|
|
action("npm_pre_flight_" + target_name) {
|
|
inputs = [
|
|
"//electron/package.json",
|
|
"//electron/yarn.lock",
|
|
]
|
|
script = "//electron/build/npm-run.py"
|
|
|
|
outputs = [ "$target_gen_dir/npm_pre_stamps/" + target_name + ".stamp" ]
|
|
|
|
args = [
|
|
"--silent",
|
|
"pre-flight",
|
|
"--",
|
|
"--stamp",
|
|
rebase_path(outputs[0]),
|
|
]
|
|
}
|
|
|
|
action(target_name) {
|
|
forward_variables_from(invoker,
|
|
[
|
|
"deps",
|
|
"public_deps",
|
|
"sources",
|
|
"inputs",
|
|
"outputs",
|
|
])
|
|
if (!defined(deps)) {
|
|
deps = []
|
|
}
|
|
deps += [ ":npm_pre_flight_" + target_name ]
|
|
|
|
script = "//electron/build/npm-run.py"
|
|
args = [
|
|
"--silent",
|
|
invoker.script,
|
|
"--",
|
|
] + invoker.args
|
|
}
|
|
}
|