forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_css.gni
40 lines (32 loc) · 890 Bytes
/
generate_css.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
# 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("generate_css") {
node_action(target_name) {
forward_variables_from(invoker, [ "sources" ])
script = "scripts/build/generate_css_js_files.js"
_src = rebase_path(".", root_build_dir)
_dest = rebase_path(target_gen_dir, root_build_dir)
inputs +=
[ devtools_location_prepend + "node_modules/clean-css/package.json" ]
args = [
"$is_debug",
target_name,
_src,
_dest,
string_join(",", sources),
]
outputs = []
foreach(_input, sources) {
outputs += [ "$target_gen_dir/$_input.js" ]
}
data = outputs
if (is_debug) {
metadata = {
grd_files = outputs
}
}
}
}