forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.gni
47 lines (39 loc) · 1.38 KB
/
rollup.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("./node.gni")
import("./vars.gni")
template("rollup") {
assert(defined(invoker.entrypoint),
"You must define the 'entrypoint' for a rollup target")
node_action(target_name) {
script = "node_modules/rollup/dist/bin/rollup"
forward_variables_from(invoker,
[
"visibility",
"deps",
"public_deps",
])
inputs = [
invoker.entrypoint,
devtools_location_prepend + "scripts/build/rollup.config.js",
]
args = [
# TODO(crbug.com/1098074): We need to hide warnings that are written stderr,
# as Chromium does not process the returncode of the subprocess correctly
# and instead looks if `stderr` is empty.
"--silent",
"--config",
rebase_path(devtools_location_prepend + "scripts/build/rollup.config.js",
root_build_dir),
"--input",
rebase_path(invoker.entrypoint, root_build_dir),
"--file",
rebase_path(invoker.output_file_location, root_build_dir),
]
if (!devtools_dcheck_always_on) {
args += [ "--configDCHECK" ]
}
outputs = [ invoker.output_file_location ]
}
}