forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevtools_pre_built.gni
42 lines (34 loc) · 1.16 KB
/
devtools_pre_built.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
# 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("./copy.gni")
template("devtools_pre_built") {
_copy_to_gen_target_name = target_name + "-copy-gen-javascript"
_copy_gen_target_dep = ":$_copy_to_gen_target_name"
copy_to_gen(_copy_to_gen_target_name) {
sources = invoker.sources
deps = invoker.deps
}
_target_outputs = get_target_outputs(_copy_gen_target_dep)
_javascript_implementation_files =
invoker.data + filter_include(_target_outputs,
[
"*.js",
"*.mjs",
])
group(target_name) {
public_deps = [ _copy_gen_target_dep ] + invoker.deps
data = _javascript_implementation_files +
filter_include(_target_outputs, [ "*.map" ])
if (invoker.sources_are_release || is_debug) {
metadata = {
grd_files = _javascript_implementation_files
}
}
}
}
set_defaults("devtools_pre_built") {
deps = []
data = []
sources_are_release = true
}