blob: a73e9920adc11fe2c9dfd2cb3b94ddcaa9055b7e [file] [log] [blame]
# 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("//tools/grit/grit_rule.gni")
import("//tools/polymer/css_to_wrapper.gni")
import("//tools/polymer/html_to_wrapper.gni")
import("//tools/typescript/ts_library.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
import("support_tool.gni")
assert(!is_android)
resources_grd_file = "$target_gen_dir/resources.grd"
generate_grd("build_grd") {
grd_prefix = "support_tool"
out_grd = resources_grd_file
input_files = html_files + [
"support_tool_container.html",
"url_generator_container.html",
]
input_files_base_dir = rebase_path(".", "//")
deps = [ ":build_ts" ]
manifest_files = [ "$target_gen_dir/tsconfig.manifest" ]
}
grit("resources") {
enable_input_discovery_for_gn_analyze = false
source = resources_grd_file
deps = [ ":build_grd" ]
outputs = [
"grit/support_tool_resources.h",
"grit/support_tool_resources_map.cc",
"grit/support_tool_resources_map.h",
"support_tool_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
copy("copy") {
sources = ts_files
outputs = [ "$target_gen_dir/{{source_file_part}}" ]
}
css_to_wrapper("css_wrapper_files") {
in_files = css_files
}
html_to_wrapper("html_wrapper_files") {
in_files = html_files
}
ts_library("build_ts") {
composite = true
root_dir = target_gen_dir
out_dir = "$target_gen_dir/tsc"
tsconfig_base = "tsconfig_base.json"
in_files = ts_files + css_wrapper_files + html_wrapper_files
deps = [
"//third_party/polymer/v3_0:library",
"//ui/webui/resources:library",
]
extra_deps = [
":copy",
":css_wrapper_files",
":html_wrapper_files",
]
definitions = [ "//tools/typescript/definitions/chrome_send.d.ts" ]
}