Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 1 | # Copyright 2020 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Tim van der Lippe | 91128ac | 2020-07-15 12:46:50 | [diff] [blame] | 5 | import("../scripts/build/ninja/copy.gni") |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 6 | import("../third_party/typescript/typescript.gni") |
| 7 | |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 8 | group("front_end") { |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 9 | public_deps = [ |
| 10 | ":front_end_html_entrypoints", |
| 11 | ":ts_library-verification", |
Paul Lewis | 270e6f3 | 2020-07-20 08:52:37 | [diff] [blame] | 12 | "accessibility:bundle", |
Jack Franklin | 899893a | 2020-07-30 14:01:39 | [diff] [blame] | 13 | "animation:bundle", |
Jack Franklin | 2c1e944 | 2020-07-20 10:11:48 | [diff] [blame] | 14 | "bindings:bundle", |
Tim van der Lippe | 207e2f9 | 2020-09-02 14:25:20 | [diff] [blame] | 15 | "browser_debugger:bundle", |
Simon Zünd | 6651f11 | 2020-07-22 06:37:33 | [diff] [blame] | 16 | "browser_sdk:bundle", |
Jan Scheffler | a5c5b34 | 2020-07-31 09:09:42 | [diff] [blame] | 17 | "changes:bundle", |
Mathias Bynens | 4a0d193 | 2020-07-28 06:31:37 | [diff] [blame] | 18 | "client_variations:bundle", |
Jack Franklin | ab6c3e5 | 2020-08-06 11:14:51 | [diff] [blame] | 19 | "cm_modes:bundle", |
Jack Franklin | 15d25c0 | 2020-07-24 10:09:50 | [diff] [blame] | 20 | "color_picker:bundle", |
Tim van der Lippe | a0b0ab6 | 2020-07-14 13:28:54 | [diff] [blame] | 21 | "common:bundle", |
Jack Franklin | 1557a1c | 2020-06-08 14:22:13 | [diff] [blame] | 22 | "component_docs", |
Jack Franklin | 7ab2274 | 2020-08-10 10:22:56 | [diff] [blame] | 23 | "component_helpers:bundle", |
Simon Zünd | 700b12b | 2020-07-24 12:25:38 | [diff] [blame] | 24 | "components:bundle", |
Jan Scheffler | c5bc69f | 2020-07-30 09:51:52 | [diff] [blame] | 25 | "console:bundle", |
Paul Lewis | c881a76 | 2020-07-27 13:52:53 | [diff] [blame] | 26 | "console_counters:bundle", |
Jan Scheffler | fd604da | 2020-07-31 10:04:10 | [diff] [blame] | 27 | "cookie_table:bundle", |
Jan Scheffler | 688afaa | 2020-07-30 14:39:14 | [diff] [blame] | 28 | "coverage:bundle", |
Jan Scheffler | e348fe9 | 2020-07-28 14:48:44 | [diff] [blame] | 29 | "css_overview:bundle", |
Jack Franklin | a33f641 | 2020-07-20 09:59:41 | [diff] [blame] | 30 | "data_grid:bundle", |
Tim van der Lippe | 0543141 | 2020-09-02 15:14:08 | [diff] [blame] | 31 | "developer_resources:bundle", |
Jan Scheffler | 80abd36 | 2020-07-28 15:24:28 | [diff] [blame] | 32 | "devices:bundle", |
Jack Franklin | 222b307 | 2020-07-24 09:45:43 | [diff] [blame] | 33 | "diff:bundle", |
Simon Zünd | 8f37642 | 2020-07-22 08:34:23 | [diff] [blame] | 34 | "dom_extension:bundle", |
Tim van der Lippe | 2957dc8 | 2020-07-14 10:22:11 | [diff] [blame] | 35 | "elements:bundle", |
Tim van der Lippe | c4e2fef | 2020-09-11 12:00:32 | [diff] [blame] | 36 | "emulated_devices/optimized:optimized_emulated_devices", |
Jan Scheffler | 5e899f2 | 2020-07-30 12:01:14 | [diff] [blame] | 37 | "emulation:bundle", |
Jan Scheffler | f2d177a | 2020-07-30 10:05:48 | [diff] [blame] | 38 | "event_listeners:bundle", |
Paul Lewis | af06661 | 2020-07-28 15:32:42 | [diff] [blame] | 39 | "extensions:bundle", |
Jack Franklin | 0bbebcb | 2020-07-24 09:02:54 | [diff] [blame] | 40 | "formatter:bundle", |
Tim van der Lippe | f377647 | 2020-07-13 17:42:39 | [diff] [blame] | 41 | "formatter_worker:bundle", |
Jan Scheffler | 0bf389b | 2020-07-27 10:48:42 | [diff] [blame] | 42 | "har_importer:bundle", |
Jan Scheffler | c86ffdf | 2020-07-27 10:57:05 | [diff] [blame] | 43 | "heap_snapshot_model:bundle", |
Tim van der Lippe | 0bd9d27 | 2020-09-02 15:45:25 | [diff] [blame] | 44 | "heap_snapshot_worker:bundle", |
Jan Scheffler | 8c02e88 | 2020-07-29 14:43:51 | [diff] [blame] | 45 | "help:bundle", |
vidorteg | 1fd76f8 | 2020-08-26 18:09:20 | [diff] [blame] | 46 | "i18n:bundle", |
Jan Scheffler | b12601a | 2020-07-28 16:20:00 | [diff] [blame] | 47 | "inline_editor:bundle", |
Jan Scheffler | da950e3 | 2020-08-03 16:16:18 | [diff] [blame] | 48 | "input:bundle", |
Jan Scheffler | fb3eb07 | 2020-07-30 12:28:26 | [diff] [blame] | 49 | "inspector_main:bundle", |
Simon Zünd | 2675d65 | 2020-07-22 06:09:42 | [diff] [blame] | 50 | "issues:bundle", |
Jan Scheffler | ebc1504 | 2020-07-27 11:16:54 | [diff] [blame] | 51 | "javascript_metadata:bundle", |
Jan Scheffler | 9cbd788 | 2020-07-28 14:29:13 | [diff] [blame] | 52 | "js_main:bundle", |
Jan Scheffler | 6a97284 | 2020-07-30 10:25:47 | [diff] [blame] | 53 | "layer_viewer:bundle", |
Jan Scheffler | 8724e33 | 2020-07-30 14:31:40 | [diff] [blame] | 54 | "layers:bundle", |
Tim van der Lippe | 132b4ba | 2020-09-02 15:00:48 | [diff] [blame] | 55 | "lighthouse:bundle", |
Jan Scheffler | 45929d7 | 2020-08-03 18:21:19 | [diff] [blame] | 56 | "main:bundle", |
Tim van der Lippe | 71ae782 | 2020-09-02 14:33:31 | [diff] [blame] | 57 | "media:bundle", |
Jan Scheffler | eb118dd | 2020-07-29 13:28:18 | [diff] [blame] | 58 | "mobile_throttling:bundle", |
Jan Scheffler | 6c0cc69 | 2020-07-31 14:26:22 | [diff] [blame] | 59 | "network:bundle", |
Jan Scheffler | fc2a4cb | 2020-07-30 15:33:22 | [diff] [blame] | 60 | "node_main:bundle", |
Jan Scheffler | f1f45a8 | 2020-07-29 14:00:36 | [diff] [blame] | 61 | "object_ui:bundle", |
Jan Scheffler | 0aecd3a | 2020-07-30 07:37:13 | [diff] [blame] | 62 | "perf_ui:bundle", |
Jan Scheffler | 069be14 | 2020-07-28 15:34:32 | [diff] [blame] | 63 | "performance_monitor:bundle", |
Jan Scheffler | 98cd900 | 2020-07-28 19:49:52 | [diff] [blame] | 64 | "persistence:bundle", |
Jan Scheffler | 77e3e68 | 2020-07-30 09:00:54 | [diff] [blame] | 65 | "profiler:bundle", |
Paul Lewis | 0345ad9 | 2020-07-28 13:01:06 | [diff] [blame] | 66 | "protocol_client:bundle", |
Jan Scheffler | 9851111 | 2020-08-03 17:35:45 | [diff] [blame] | 67 | "protocol_monitor:bundle", |
Jan Scheffler | 20be618 | 2020-07-29 13:55:16 | [diff] [blame] | 68 | "quick_open:bundle", |
Jan Scheffler | 52b1f35 | 2020-07-31 09:23:50 | [diff] [blame] | 69 | "resources:bundle", |
Jan Scheffler | 3f2805a | 2020-07-28 16:08:30 | [diff] [blame] | 70 | "screencast:bundle", |
Tim van der Lippe | 2957dc8 | 2020-07-14 10:22:11 | [diff] [blame] | 71 | "sdk:bundle", |
Simon Zünd | 5426af1 | 2020-07-24 15:00:08 | [diff] [blame] | 72 | "search:bundle", |
Jan Scheffler | 86ae5bd | 2020-07-31 16:25:57 | [diff] [blame] | 73 | "security:bundle", |
Jan Scheffler | 0126f0e | 2020-07-28 15:16:00 | [diff] [blame] | 74 | "services:bundle", |
Jan Scheffler | d8380b6 | 2020-07-28 16:14:15 | [diff] [blame] | 75 | "settings:bundle", |
Jan Scheffler | cde20c7 | 2020-07-30 11:10:36 | [diff] [blame] | 76 | "snippets:bundle", |
Jan Scheffler | 4a89ed3 | 2020-07-29 16:19:13 | [diff] [blame] | 77 | "source_frame:bundle", |
Jan Scheffler | e1a1b0f | 2020-07-31 13:57:44 | [diff] [blame] | 78 | "sources:bundle", |
Tim van der Lippe | 1164044 | 2020-09-02 15:53:38 | [diff] [blame] | 79 | "test_runner:bundle", |
Jack Franklin | 9e042a9 | 2020-07-28 08:41:28 | [diff] [blame] | 80 | "text_editor:bundle", |
Paul Lewis | 4b15caf | 2020-07-27 12:54:01 | [diff] [blame] | 81 | "text_utils:bundle", |
Paul Lewis | 7b17f16 | 2020-08-10 15:26:08 | [diff] [blame] | 82 | "theme_support:bundle", |
Tim van der Lippe | cdd175d | 2020-07-15 12:47:37 | [diff] [blame] | 83 | "third_party/lighthouse", |
Paul Lewis | a67d868 | 2020-09-08 12:17:03 | [diff] [blame] | 84 | "third_party/puppeteer:bundle", |
Jan Scheffler | f168ba4 | 2020-07-30 15:29:47 | [diff] [blame] | 85 | "timeline:bundle", |
Jan Scheffler | 0c90532 | 2020-07-24 13:11:13 | [diff] [blame] | 86 | "timeline_model:bundle", |
Jack Franklin | 07e8df6 | 2020-07-29 09:54:55 | [diff] [blame] | 87 | "toolbox_bootstrap:bundle", |
Jan Scheffler | 0a3d3cb | 2020-07-28 11:03:06 | [diff] [blame] | 88 | "ui:bundle", |
Tim van der Lippe | b16e254 | 2020-09-02 15:31:31 | [diff] [blame] | 89 | "wasmparser_worker:bundle", |
Jan Scheffler | 450b165 | 2020-08-03 16:11:51 | [diff] [blame] | 90 | "web_audio:bundle", |
Tim van der Lippe | 01b8008 | 2020-09-02 15:08:32 | [diff] [blame] | 91 | "webauthn:bundle", |
Jan Scheffler | 44e3af6 | 2020-07-30 14:33:49 | [diff] [blame] | 92 | "worker_main:bundle", |
Jan Scheffler | cec3e4f | 2020-07-27 10:45:02 | [diff] [blame] | 93 | "worker_service:bundle", |
Jack Franklin | 3c2fa9f | 2020-07-24 08:22:28 | [diff] [blame] | 94 | "workspace:bundle", |
Jan Scheffler | 702bd2a | 2020-07-24 23:48:39 | [diff] [blame] | 95 | "workspace_diff:bundle", |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 96 | ] |
Tim van der Lippe | 6340726 | 2020-07-13 10:43:45 | [diff] [blame] | 97 | |
Tim van der Lippe | 91128ac | 2020-07-15 12:46:50 | [diff] [blame] | 98 | data_deps = [ |
| 99 | ":embedder-scripts", |
| 100 | ":front_end_html_entrypoints", |
Jack Franklin | d99fe639 | 2020-09-02 14:03:59 | [diff] [blame] | 101 | ":legacy_css", |
| 102 | ] |
| 103 | } |
| 104 | |
Tim van der Lippe | bdf5ca4 | 2020-09-11 12:05:12 | [diff] [blame] | 105 | group("legacy_test-resources") { |
Tim van der Lippe | 374ec55 | 2020-09-11 13:14:24 | [diff] [blame] | 106 | public_deps = [ |
| 107 | "accessibility_test_runner:bundle", |
| 108 | "application_test_runner:bundle", |
Tim van der Lippe | ab0853c | 2020-09-11 13:34:31 | [diff] [blame] | 109 | "axe_core_test_runner:bundle", |
Tim van der Lippe | 538dd8e | 2020-09-14 12:16:04 | [diff] [blame] | 110 | "bindings_test_runner:bundle", |
Tim van der Lippe | 5faef2f | 2020-09-14 12:34:34 | [diff] [blame] | 111 | "console_test_runner:bundle", |
Tim van der Lippe | 822fc74 | 2020-09-14 12:37:12 | [diff] [blame] | 112 | "coverage_test_runner:bundle", |
Tim van der Lippe | 111373f | 2020-09-14 12:44:38 | [diff] [blame] | 113 | "cpu_profiler_test_runner:bundle", |
Tim van der Lippe | cb4236a | 2020-09-14 12:51:15 | [diff] [blame] | 114 | "data_grid_test_runner:bundle", |
Tim van der Lippe | 5eaefe0 | 2020-09-14 12:53:38 | [diff] [blame] | 115 | "device_mode_test_runner:bundle", |
Tim van der Lippe | 8a8e01b | 2020-09-14 12:57:33 | [diff] [blame] | 116 | "elements_test_runner:bundle", |
Tim van der Lippe | c85a9a7 | 2020-09-14 13:03:32 | [diff] [blame] | 117 | "extensions_test_runner:bundle", |
Tim van der Lippe | cc28e23 | 2020-09-14 13:08:05 | [diff] [blame] | 118 | "heap_profiler_test_runner:bundle", |
Tim van der Lippe | 053b0e6 | 2020-09-14 13:15:49 | [diff] [blame] | 119 | "layers_test_runner:bundle", |
Tim van der Lippe | d707b33 | 2020-09-14 13:19:59 | [diff] [blame^] | 120 | "lighthouse_test_runner:bundle", |
Tim van der Lippe | 374ec55 | 2020-09-11 13:14:24 | [diff] [blame] | 121 | ] |
Tim van der Lippe | bdf5ca4 | 2020-09-11 12:05:12 | [diff] [blame] | 122 | } |
| 123 | |
Jack Franklin | d99fe639 | 2020-09-02 14:03:59 | [diff] [blame] | 124 | group("legacy_css") { |
| 125 | public_deps = [ |
| 126 | "cm:legacy_css", |
| 127 | "components:legacy_css", |
| 128 | "console:legacy_css", |
| 129 | "console_counters:legacy_css", |
| 130 | "data_grid:legacy_css", |
| 131 | "elements:legacy_css", |
| 132 | "emulation:legacy_css", |
| 133 | "help:legacy_css", |
| 134 | "inspector_main:legacy_css", |
| 135 | "mobile_throttling:legacy_css", |
| 136 | "object_ui:legacy_css", |
| 137 | "persistence:legacy_css", |
| 138 | "ui:legacy_css", |
Tim van der Lippe | 91128ac | 2020-07-15 12:46:50 | [diff] [blame] | 139 | ] |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 140 | } |
| 141 | |
Tim van der Lippe | f665049 | 2020-07-16 13:41:14 | [diff] [blame] | 142 | copy_sources_to_resources("front_end_html_entrypoints") { |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 143 | sources = [ |
| 144 | "devtools_app.html", |
Tim van der Lippe | 45fb1f2 | 2020-07-17 12:26:44 | [diff] [blame] | 145 | "formatter_worker_entrypoint.js", |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 146 | "inspector.html", |
Tim van der Lippe | 8ea04b0 | 2020-05-26 09:57:58 | [diff] [blame] | 147 | "integration_test_runner.html", |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 148 | "js_app.html", |
| 149 | "ndb_app.html", |
| 150 | "node_app.html", |
| 151 | "toolbox.html", |
| 152 | "worker_app.html", |
| 153 | ] |
Tim van der Lippe | 4915591 | 2020-05-12 11:26:44 | [diff] [blame] | 154 | } |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 155 | |
Tim van der Lippe | 91128ac | 2020-07-15 12:46:50 | [diff] [blame] | 156 | copy_sources_to_resources("embedder-scripts") { |
| 157 | sources = [ |
| 158 | "Tests.js", |
| 159 | "devtools_compatibility.js", |
| 160 | ] |
| 161 | } |
| 162 | |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 163 | # This target is used to perform checks on all generated `.d.ts` files. |
| 164 | # Previously we would only run these checks when `is_debug=false`, but |
| 165 | # this complicated debugging. Therefore, this target now always perform |
| 166 | # the check, but we only check the `.d.ts` files once (rather than for |
| 167 | # every single defined `ts_library`). |
| 168 | # |
| 169 | # Whenever a folder is fully checked by the TypeScript compiler, add |
| 170 | # the folder to the `deps` of this target AND add a corresponding |
| 171 | # `import`-statement to the `verification.ts` file. Without adding |
| 172 | # the `import`-statement, TypeScript will be "smart" and ignore all |
| 173 | # declaration files it doesn't have to use. |
| 174 | ts_library("ts_library-verification") { |
| 175 | verify_lib_check = true |
| 176 | |
| 177 | sources = [ "verification.ts" ] |
| 178 | |
| 179 | deps = [ |
Jack Franklin | 2c1e944 | 2020-07-20 10:11:48 | [diff] [blame] | 180 | "bindings:bundle", |
Simon Zünd | 6651f11 | 2020-07-22 06:37:33 | [diff] [blame] | 181 | "browser_sdk:bundle", |
Jack Franklin | 15d25c0 | 2020-07-24 10:09:50 | [diff] [blame] | 182 | "color_picker:bundle", |
Tim van der Lippe | ced0044 | 2020-07-16 14:12:35 | [diff] [blame] | 183 | "common:bundle", |
Simon Zünd | 8f37642 | 2020-07-22 08:34:23 | [diff] [blame] | 184 | "dom_extension:bundle", |
Paul Lewis | 9b9d88b | 2020-07-20 10:54:50 | [diff] [blame] | 185 | "host:bundle", |
Paul Lewis | 0345ad9 | 2020-07-28 13:01:06 | [diff] [blame] | 186 | "protocol_client:bundle", |
Paul Lewis | e9817f5 | 2020-07-22 09:21:34 | [diff] [blame] | 187 | "root:bundle", |
Tim van der Lippe | ced0044 | 2020-07-16 14:12:35 | [diff] [blame] | 188 | "sdk:bundle", |
Jack Franklin | 3c2fa9f | 2020-07-24 08:22:28 | [diff] [blame] | 189 | "workspace:bundle", |
Tim van der Lippe | 501473c | 2020-05-19 15:01:52 | [diff] [blame] | 190 | ] |
| 191 | } |