mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
The devtools profiler is not attached at the point we run out init scripts (or our apps preload scripts), we do not really want to change when we run these init scripts but for when a dev is doing performance work it makes sense to give them an option to make the devtools profiler actually work on both our init scripts and their preload script. This PR adds that logic behind an environment variable ELECTRON_PROFILE_INIT_SCRIPTS.
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
import("../npm.gni")
|
|
|
|
template("webpack_build") {
|
|
assert(defined(invoker.config_file), "Need webpack config file to run")
|
|
assert(defined(invoker.out_file), "Need output file to run")
|
|
assert(defined(invoker.inputs), "Need webpack inputs to run")
|
|
|
|
npm_action(target_name) {
|
|
forward_variables_from(invoker,
|
|
[
|
|
"deps",
|
|
"public_deps",
|
|
])
|
|
script = "webpack"
|
|
|
|
inputs = [
|
|
invoker.config_file,
|
|
"//electron/build/webpack/webpack.config.base.js",
|
|
"//electron/build/webpack/run-compiler.js",
|
|
"//electron/tsconfig.json",
|
|
"//electron/yarn.lock",
|
|
"//electron/typings/internal-ambient.d.ts",
|
|
"//electron/typings/internal-electron.d.ts",
|
|
] + invoker.inputs
|
|
|
|
args = [
|
|
rebase_path(invoker.config_file),
|
|
rebase_path(invoker.out_file),
|
|
"--buildflags=" + rebase_path("$target_gen_dir/buildflags/buildflags.h"),
|
|
]
|
|
deps += [ "buildflags" ]
|
|
|
|
outputs = [ invoker.out_file ]
|
|
}
|
|
}
|