[go: nahoru, domu]

blob: 9264d2633625b17275b650d0c622117d4867ed8c [file] [log] [blame]
# 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("//build/config/python.gni")
import("../third_party/typescript/typescript.gni")
resources_out_dir = "$root_out_dir/resources/inspector_overlay"
# TODO(crbug.com/1112471): Get this to work under Python 3.
python2_action("build_inspector_overlay") {
script = "../scripts/build/build_inspector_overlay.py"
inputs = [
"$target_gen_dir/common.css",
"$target_gen_dir/common.js",
"$target_gen_dir/css_grid_label_helpers.js",
"$target_gen_dir/highlight_common.js",
"$target_gen_dir/highlight_grid_common.js",
"$target_gen_dir/tool_distances_impl.js",
"$target_gen_dir/tool_highlight_grid_impl.js",
"$target_gen_dir/tool_highlight_grid.css",
"$target_gen_dir/tool_highlight_impl.js",
"$target_gen_dir/tool_highlight.css",
"$target_gen_dir/tool_paused_impl.js",
"$target_gen_dir/tool_paused.css",
"$target_gen_dir/tool_screenshot_impl.js",
"$target_gen_dir/tool_screenshot.css",
"$target_gen_dir/tool_source_order_impl.js",
"$target_gen_dir/tool_source_order.css",
"$target_gen_dir/tool_viewport_size_impl.js",
"$target_gen_dir/main.js",
]
outputs = [ "$resources_out_dir/main.js" ]
args = [
"main.js",
"110000", # max_size in bytes
"--input_path",
rebase_path(target_gen_dir, root_build_dir),
"--output_path",
rebase_path(resources_out_dir, root_build_dir),
"--rollup_plugin",
rebase_path("loadCSS.rollup.js", root_build_dir),
]
public_deps = [
":copy_css_to_gen",
":copy_resources",
":inspector_overlay",
]
}
copy("copy_resources") {
sources = [ "resources.grd" ]
outputs = [ "$resources_out_dir/inspector_overlay_resources.grd" ]
}
copy("copy_css_to_gen") {
sources = [
"common.css",
"tool_highlight.css",
"tool_highlight_grid.css",
"tool_paused.css",
"tool_screenshot.css",
"tool_source_order.css",
]
outputs = [ "$target_gen_dir/{{source_file_part}}" ]
}
ts_library("inspector_overlay") {
sources = [
"common.ts",
"css_grid_label_helpers.ts",
"highlight_common.ts",
"highlight_grid_common.ts",
"main.ts",
"tool_distances_impl.ts",
"tool_highlight_grid_impl.ts",
"tool_highlight_impl.ts",
"tool_paused_impl.ts",
"tool_screenshot_impl.ts",
"tool_source_order_impl.ts",
"tool_viewport_size_impl.ts",
]
deps = [ "../front_end/common:bundle" ]
}