mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 05:35:05 +08:00
Since we now use the GN metadata to specify all relevant files, we no longer require these lists. That allows us to clean up the various actions to no longer having to check the contents of the lists. R=aerotwist@chromium.org Bug: 1174013 Change-Id: Ia361aec69fe9af702a7667e33f7fc389f8a5a24f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2844169 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
# Copyright 2020 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("../../../third_party/typescript/typescript.gni")
|
|
import("./copy.gni")
|
|
import("./vars.gni")
|
|
|
|
template("devtools_module") {
|
|
_typescript_target_name = target_name + "-typescript"
|
|
_typescript_target_dep = ":$_typescript_target_name"
|
|
|
|
ts_library(_typescript_target_name) {
|
|
forward_variables_from(invoker,
|
|
[
|
|
"sources",
|
|
"deps",
|
|
])
|
|
|
|
# To make sure that this target can be depended upon by other TypeScript targets,
|
|
# we have to name it the `target_name`. However, we can't name this `ts_library` the
|
|
# `target_name`, as the buildgraph requires the `copy_gen__to_resources` to happen *after*
|
|
# `ts_library` is finished.
|
|
typescript_config_name = invoker.target_name
|
|
|
|
visibility += [ ":*" ]
|
|
}
|
|
_target_outputs = get_target_outputs(_typescript_target_dep)
|
|
_javascript_implementation_files =
|
|
filter_include(_target_outputs + invoker.data, [ "*.js" ])
|
|
|
|
group(target_name) {
|
|
public_deps = [ _typescript_target_dep ]
|
|
|
|
visibility = invoker.visibility + [ ":*" ]
|
|
|
|
data = _javascript_implementation_files +
|
|
filter_include(invoker.data + _target_outputs, [ "*.map" ])
|
|
if (is_debug) {
|
|
metadata = {
|
|
grd_files = _javascript_implementation_files
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
set_defaults("devtools_module") {
|
|
visibility = []
|
|
data = []
|
|
}
|