2019-02-05 20:10:15 +00:00
|
|
|
template("node_action") {
|
|
|
|
assert(defined(invoker.script), "Need script path to run")
|
2022-06-16 07:46:11 +00:00
|
|
|
assert(defined(invoker.args), "Need script arguments")
|
2019-02-05 20:10:15 +00:00
|
|
|
|
|
|
|
action(target_name) {
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
[
|
|
|
|
"deps",
|
|
|
|
"public_deps",
|
|
|
|
"sources",
|
|
|
|
"inputs",
|
|
|
|
"outputs",
|
|
|
|
])
|
|
|
|
if (!defined(inputs)) {
|
|
|
|
inputs = []
|
|
|
|
}
|
|
|
|
inputs += [ invoker.script ]
|
|
|
|
script = "//electron/build/run-node.py"
|
|
|
|
args = [ rebase_path(invoker.script) ] + invoker.args
|
|
|
|
}
|
|
|
|
}
|