forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_css.gni
More file actions
52 lines (42 loc) · 1.11 KB
/
generate_css.gni
File metadata and controls
52 lines (42 loc) · 1.11 KB
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
48
49
50
51
52
# 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("//build/timestamp.gni")
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 = [
build_timestamp,
"$is_debug",
"${invoker.legacy}",
target_name,
_src,
_dest,
string_join(",", sources),
]
outputs = []
foreach(_input, sources) {
_file_name = _input
if (invoker.legacy) {
_file_name = "$_file_name.legacy"
}
outputs += [ "$target_gen_dir/$_file_name.js" ]
}
data = outputs
if (is_debug) {
metadata = {
grd_files = outputs
}
}
}
}
set_defaults("generate_css") {
legacy = false
}