| # 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("../scripts/build/ninja/copy.gni") |
| import("../scripts/build/ninja/devtools_entrypoint.gni") |
| import("../scripts/build/ninja/node.gni") |
| import("../scripts/build/ninja/vars.gni") |
| import("../third_party/typescript/typescript.gni") |
| |
| group("front_end") { |
| public_deps = [ |
| ":devtools_app", |
| ":embedder-scripts", |
| ":html_entrypoints", |
| ":inspector", |
| ":integration_test_runner", |
| ":js_app", |
| ":legacy_css", |
| ":legacy_entrypoints", |
| ":ndb_app", |
| ":node_app", |
| ":shell", |
| ":toolbox", |
| ":ts_library-verification", |
| ":worker_app", |
| "bindings:bundle", |
| "color_picker:bundle", |
| "common:bundle", |
| "component_helpers:bundle", |
| "components:bundle", |
| "cookie_table:bundle", |
| "data_grid:bundle", |
| "diff:bundle", |
| "emulated_devices/optimized:optimized_emulated_devices", |
| "event_listeners:bundle", |
| "extensions:bundle", |
| "formatter:bundle", |
| "formatter_worker:worker_entrypoint", |
| "har_importer:bundle", |
| "heap_snapshot_model:bundle", |
| "heap_snapshot_worker:worker_entrypoint", |
| "i18n:bundle", |
| "inline_editor:bundle", |
| "javascript_metadata:bundle", |
| "js_main:bundle", |
| "lighthouse_worker:bundle", |
| "protocol_client:bundle", |
| "recorder:bundle", |
| "render_coordinator:bundle", |
| "screencast:bundle", |
| "search:bundle", |
| "snippets:bundle", |
| "startup:bundle", |
| "test_runner:bundle", |
| "text_editor:bundle", |
| "text_utils:bundle", |
| "theme_support:bundle", |
| "third_party/lighthouse", |
| "third_party/puppeteer:bundle", |
| "timeline_model:bundle", |
| "ui:bundle", |
| "ui/components:bundle", |
| "wasmparser_worker:worker_entrypoint", |
| "worker_main:bundle", |
| "workspace:bundle", |
| "workspace_diff:bundle", |
| ] |
| } |
| |
| group("legacy_test-resources") { |
| public_deps = [ |
| "accessibility_test_runner:bundle", |
| "application_test_runner:bundle", |
| "axe_core_test_runner:bundle", |
| "bindings_test_runner:bundle", |
| "console_test_runner:bundle", |
| "coverage_test_runner:bundle", |
| "cpu_profiler_test_runner:bundle", |
| "data_grid_test_runner:bundle", |
| "device_mode_test_runner:bundle", |
| "elements_test_runner:bundle", |
| "extensions_test_runner:bundle", |
| "heap_profiler_test_runner:bundle", |
| "layers_test_runner:bundle", |
| "lighthouse_test_runner:bundle", |
| "network_test_runner:bundle", |
| "performance_test_runner:bundle", |
| "sdk_test_runner:bundle", |
| "security_test_runner:bundle", |
| "sources_test_runner:bundle", |
| ] |
| } |
| |
| group("legacy_css") { |
| public_deps = [ |
| "cm:legacy_css", |
| "components:legacy_css", |
| "console:legacy_css", |
| "data_grid:legacy_css", |
| "elements:legacy_css", |
| "emulation:legacy_css", |
| "help:legacy_css", |
| "inline_editor:legacy_css", |
| "inspector_main:legacy_css", |
| "mobile_throttling:legacy_css", |
| "object_ui:legacy_css", |
| "persistence:legacy_css", |
| "text_editor:legacy_css", |
| "ui:legacy_css", |
| ] |
| } |
| |
| group("legacy_entrypoints") { |
| public_deps = [ |
| "accessibility:legacy", |
| "animation:legacy", |
| "bindings:legacy", |
| "browser_debugger:legacy", |
| "changes:legacy", |
| "color_picker:legacy", |
| "common:legacy", |
| "components:legacy", |
| "console:legacy", |
| "console_counters:legacy", |
| "cookie_table:legacy", |
| "coverage:legacy", |
| "data_grid:legacy", |
| "developer_resources:legacy", |
| "diff:legacy", |
| "elements:legacy", |
| "emulation:legacy", |
| "event_listeners:legacy", |
| "extensions:legacy", |
| "formatter:legacy", |
| "har_importer:legacy", |
| "heap_snapshot_model:legacy", |
| "heap_snapshot_worker:legacy", |
| "help:legacy", |
| "host:legacy", |
| "inline_editor:legacy", |
| "input:legacy", |
| "inspector_main:legacy", |
| "issues:legacy", |
| "javascript_metadata:legacy", |
| "js_main:legacy", |
| "layer_viewer:legacy", |
| "layers:legacy", |
| "lighthouse:legacy", |
| "linear_memory_inspector:legacy", |
| "main:legacy", |
| "media:legacy", |
| "mobile_throttling:legacy", |
| "network:legacy", |
| "node_main:legacy", |
| "object_ui:legacy", |
| "perf_ui:legacy", |
| "performance_monitor:legacy", |
| "persistence:legacy", |
| "profiler:legacy", |
| "protocol_client:legacy", |
| "protocol_monitor:legacy", |
| "quick_open:legacy", |
| "resources:legacy", |
| "root:legacy", |
| "screencast:legacy", |
| "sdk:legacy", |
| "search:legacy", |
| "security:legacy", |
| "settings:legacy", |
| "snippets:legacy", |
| "source_frame:legacy", |
| "sources:legacy", |
| "text_editor:legacy", |
| "text_utils:legacy", |
| "timeline:legacy", |
| "timeline_model:legacy", |
| "ui:legacy", |
| "web_audio:legacy", |
| "webauthn:legacy", |
| "worker_main:legacy", |
| "workspace:legacy", |
| "workspace_diff:legacy", |
| ] |
| } |
| |
| ts_library("shell") { |
| no_emit = true |
| sources = [ "shell.js" ] |
| |
| deps = [ |
| "bindings:legacy", |
| "browser_sdk:meta", |
| "changes:meta", |
| "components:legacy", |
| "console:meta", |
| "console_counters:legacy", |
| "console_counters:meta", |
| "coverage:meta", |
| "dom_extension:bundle", |
| "extensions:legacy", |
| "host:legacy", |
| "input:meta", |
| "linear_memory_inspector:meta", |
| "main:meta", |
| "object_ui:meta", |
| "perf_ui:meta", |
| "persistence:legacy", |
| "persistence:meta", |
| "profiler:meta", |
| "protocol_client:legacy", |
| "protocol_monitor:meta", |
| "quick_open:meta", |
| "sdk:legacy", |
| "sdk:meta", |
| "settings:meta", |
| "source_frame:meta", |
| "sources:meta", |
| "startup:bundle", |
| "ui:legacy", |
| "workspace:legacy", |
| ] |
| } |
| |
| ts_library("devtools_app") { |
| no_emit = true |
| sources = [ "devtools_app.js" ] |
| |
| deps = [ |
| ":shell", |
| "accessibility:meta", |
| "animation:meta", |
| "browser_debugger:meta", |
| "css_overview:meta", |
| "developer_resources:meta", |
| "elements:meta", |
| "emulation:meta", |
| "help:meta", |
| "inspector_main:meta", |
| "issues:meta", |
| "layer_viewer:meta", |
| "layers:meta", |
| "lighthouse:meta", |
| "media:meta", |
| "mobile_throttling:meta", |
| "network:meta", |
| "performance_monitor:meta", |
| "resources:meta", |
| "security:meta", |
| "startup:bundle", |
| "timeline:meta", |
| "web_audio:meta", |
| "webauthn:meta", |
| ] |
| } |
| |
| ts_library("inspector") { |
| no_emit = true |
| sources = [ "inspector.js" ] |
| |
| deps = [ |
| ":devtools_app", |
| "screencast:meta", |
| "startup:bundle", |
| ] |
| } |
| |
| ts_library("js_app") { |
| no_emit = true |
| sources = [ "js_app.js" ] |
| |
| deps = [ |
| ":shell", |
| "js_profiler:meta", |
| "startup:bundle", |
| ] |
| } |
| |
| ts_library("ndb_app") { |
| no_emit = true |
| sources = [ "ndb_app.js" ] |
| |
| deps = [ |
| ":shell", |
| "startup:bundle", |
| ] |
| } |
| |
| ts_library("node_app") { |
| no_emit = true |
| sources = [ "node_app.js" ] |
| |
| deps = [ |
| ":shell", |
| "js_profiler:meta", |
| "node_debugger:meta", |
| "node_main:meta", |
| "startup:bundle", |
| ] |
| } |
| |
| devtools_entrypoint("toolbox") { |
| entrypoint = "toolbox.ts" |
| |
| deps = [ |
| "dom_extension:bundle", |
| "platform:bundle", |
| ] |
| } |
| |
| ts_library("worker_app") { |
| no_emit = true |
| sources = [ "worker_app.js" ] |
| |
| deps = [ |
| ":shell", |
| "browser_debugger:meta", |
| "developer_resources:meta", |
| "elements:meta", |
| "help:meta", |
| "issues:meta", |
| "layer_viewer:meta", |
| "mobile_throttling:meta", |
| "network:meta", |
| "resources:meta", |
| "startup:bundle", |
| "timeline:meta", |
| ] |
| } |
| |
| group("integration_test_runner") { |
| public_deps = [ |
| ":integration_test_runner-gen", |
| ":integration_test_runner-resources", |
| ] |
| data_deps = public_deps |
| } |
| |
| copy_sources_to_resources("integration_test_runner-resources") { |
| sources = [ "integration_test_runner.html" ] |
| } |
| |
| copy_to_gen("integration_test_runner-gen") { |
| sources = [ "integration_test_runner.html" ] |
| } |
| |
| node_action("html_entrypoints-generation") { |
| inputs = [ "entrypoint_template.html" ] |
| |
| script = "scripts/build/generate_html_entrypoint.js" |
| |
| args = [ |
| "--template", |
| rebase_path("entrypoint_template.html", root_build_dir), |
| "--out-directory", |
| rebase_path(target_gen_dir, root_build_dir), |
| ] |
| |
| outputs = [ |
| "$target_gen_dir/devtools_app.html", |
| "$target_gen_dir/inspector.html", |
| "$target_gen_dir/js_app.html", |
| "$target_gen_dir/ndb_app.html", |
| "$target_gen_dir/node_app.html", |
| "$target_gen_dir/toolbox.html", |
| "$target_gen_dir/worker_app.html", |
| ] |
| } |
| |
| copy("html_entrypoints") { |
| sources = [ |
| "$target_gen_dir/devtools_app.html", |
| "$target_gen_dir/inspector.html", |
| "$target_gen_dir/js_app.html", |
| "$target_gen_dir/ndb_app.html", |
| "$target_gen_dir/node_app.html", |
| "$target_gen_dir/toolbox.html", |
| "$target_gen_dir/worker_app.html", |
| ] |
| |
| outputs = [ "$resources_out_dir/{{source_file_part}}" ] |
| |
| public_deps = [ ":html_entrypoints-generation" ] |
| data_deps = [ ":html_entrypoints-generation" ] |
| } |
| |
| group("embedder-scripts") { |
| public_deps = [ |
| ":gen-embedder-scripts", |
| ":resources-embedder-scripts", |
| ] |
| } |
| |
| copy_sources_to_resources("resources-embedder-scripts") { |
| sources = [ |
| "Tests.js", |
| "devtools_compatibility.js", |
| ] |
| } |
| |
| copy_to_gen("gen-embedder-scripts") { |
| sources = [ |
| "Tests.js", |
| "devtools_compatibility.js", |
| ] |
| } |
| |
| # This target is used to perform checks on all generated `.d.ts` files. |
| # Previously we would only run these checks when `is_debug=false`, but |
| # this complicated debugging. Therefore, this target now always perform |
| # the check, but we only check the `.d.ts` files once (rather than for |
| # every single defined `ts_library`). |
| # |
| # Whenever a folder is fully checked by the TypeScript compiler, add |
| # the folder to the `deps` of this target AND add a corresponding |
| # `import`-statement to the `verification.ts` file. Without adding |
| # the `import`-statement, TypeScript will be "smart" and ignore all |
| # declaration files it doesn't have to use. |
| ts_library("ts_library-verification") { |
| verify_lib_check = true |
| |
| sources = [ "verification.ts" ] |
| |
| deps = [ |
| "bindings:bundle", |
| "browser_sdk:bundle", |
| "color_picker:bundle", |
| "common:bundle", |
| "dom_extension:bundle", |
| "host:bundle", |
| "protocol_client:bundle", |
| "root:bundle", |
| "sdk:bundle", |
| "workspace:bundle", |
| ] |
| } |