From a5c5b34d67bd6f615a9cf05895573cfc2dcfdfe1 Mon Sep 17 00:00:00 2001 From: Jan Scheffler Date: Fri, 31 Jul 2020 11:09:42 +0200 Subject: [PATCH] Migrate `front_end/changes` to `devtools_entrypoint` R=aerotwist@chromium.org, jacktfranklin@chromium.org Bug: 1101738 Change-Id: Ie26902cda0e64b14670026bfc92ed9c65e9fdaa3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332221 Commit-Queue: Jan Scheffler Reviewed-by: Jack Franklin --- all_devtools_modules.gni | 8 +++---- devtools_module_entrypoints.gni | 2 +- front_end/BUILD.gn | 1 + front_end/changes/BUILD.gn | 32 +++++++++++++++++++++++++ front_end/changes/ChangesHighlighter.js | 3 +++ front_end/changes/ChangesSidebar.js | 3 +++ front_end/changes/ChangesTextEditor.js | 3 +++ front_end/changes/ChangesView.js | 3 +++ front_end/changes/module.json | 5 ++-- 9 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 front_end/changes/BUILD.gn diff --git a/all_devtools_modules.gni b/all_devtools_modules.gni index 4178deed65..1ec908ed10 100644 --- a/all_devtools_modules.gni +++ b/all_devtools_modules.gni @@ -9,10 +9,6 @@ all_devtools_module_sources = [ "browser_debugger/EventListenerBreakpointsSidebarPane.js", "browser_debugger/ObjectEventListenersSidebarPane.js", "browser_debugger/XHRBreakpointsSidebarPane.js", - "changes/ChangesHighlighter.js", - "changes/ChangesSidebar.js", - "changes/ChangesTextEditor.js", - "changes/ChangesView.js", "cm_modes/DefaultCodeMirrorMimeMode.js", "developer_resources/DeveloperResourcesListView.js", "developer_resources/DeveloperResourcesView.js", @@ -197,6 +193,10 @@ all_typescript_module_sources = [ "browser_sdk/IssuesManager.js", "browser_sdk/LogManager.js", "browser_sdk/RelatedIssue.js", + "changes/ChangesHighlighter.js", + "changes/ChangesSidebar.js", + "changes/ChangesTextEditor.js", + "changes/ChangesView.js", "color_picker/ContrastDetails.js", "color_picker/ContrastInfo.js", "color_picker/ContrastOverlay.js", diff --git a/devtools_module_entrypoints.gni b/devtools_module_entrypoints.gni index 20fa241359..808c7107c6 100644 --- a/devtools_module_entrypoints.gni +++ b/devtools_module_entrypoints.gni @@ -13,7 +13,6 @@ devtools_module_entrypoint_sources = [ "browser_debugger/browser_debugger.js", "browser_sdk/browser_sdk-legacy.js", "changes/changes-legacy.js", - "changes/changes.js", "cm_modes/cm_modes.js", "color_picker/color_picker-legacy.js", "common/common-legacy.js", @@ -113,6 +112,7 @@ generated_typescript_entrypoint_sources = [ "$resources_out_dir/animation/animation.js", "$resources_out_dir/bindings/bindings.js", "$resources_out_dir/browser_sdk/browser_sdk.js", + "$resources_out_dir/changes/changes.js", "$resources_out_dir/client_variations/client_variations.js", "$resources_out_dir/cm/cm.js", "$resources_out_dir/cm_headless/cm_headless.js", diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn index 7ec74fb481..c6720a13ad 100644 --- a/front_end/BUILD.gn +++ b/front_end/BUILD.gn @@ -13,6 +13,7 @@ group("front_end") { "animation:bundle", "bindings:bundle", "browser_sdk:bundle", + "changes:bundle", "client_variations:bundle", "color_picker:bundle", "common:bundle", diff --git a/front_end/changes/BUILD.gn b/front_end/changes/BUILD.gn new file mode 100644 index 0000000000..ff7b410407 --- /dev/null +++ b/front_end/changes/BUILD.gn @@ -0,0 +1,32 @@ +# 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/devtools_entrypoint.gni") +import("../../scripts/build/ninja/devtools_module.gni") + +devtools_module("changes") { + sources = [ + "ChangesHighlighter.js", + "ChangesSidebar.js", + "ChangesTextEditor.js", + "ChangesView.js", + ] + + deps = [ + "../common:bundle", + "../diff:bundle", + "../snippets:bundle", + "../text_editor:bundle", + "../ui:bundle", + "../workspace:bundle", + "../workspace_diff:bundle", + ] +} + +devtools_entrypoint("bundle") { + entrypoint = "changes.js" + is_legacy_javascript_entrypoint = [ "crbug.com/1011811" ] + + deps = [ ":changes" ] +} diff --git a/front_end/changes/ChangesHighlighter.js b/front_end/changes/ChangesHighlighter.js index 4223c25c91..ae6590b863 100644 --- a/front_end/changes/ChangesHighlighter.js +++ b/front_end/changes/ChangesHighlighter.js @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks + import {Row, RowType} from './ChangesView.js'; // eslint-disable-line no-unused-vars /** diff --git a/front_end/changes/ChangesSidebar.js b/front_end/changes/ChangesSidebar.js index 79deb50a1e..d9cd9c3530 100644 --- a/front_end/changes/ChangesSidebar.js +++ b/front_end/changes/ChangesSidebar.js @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks + import * as Common from '../common/common.js'; import * as Snippets from '../snippets/snippets.js'; import * as UI from '../ui/ui.js'; diff --git a/front_end/changes/ChangesTextEditor.js b/front_end/changes/ChangesTextEditor.js index 99a4d89a5e..e062b97089 100644 --- a/front_end/changes/ChangesTextEditor.js +++ b/front_end/changes/ChangesTextEditor.js @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks + import * as TextEditor from '../text_editor/text_editor.js'; import * as UI from '../ui/ui.js'; // eslint-disable-line no-unused-vars diff --git a/front_end/changes/ChangesView.js b/front_end/changes/ChangesView.js index cd0ed4291c..f8846677b6 100644 --- a/front_end/changes/ChangesView.js +++ b/front_end/changes/ChangesView.js @@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks + import * as Common from '../common/common.js'; import * as Diff from '../diff/diff.js'; import * as UI from '../ui/ui.js'; diff --git a/front_end/changes/module.json b/front_end/changes/module.json index 3037d65203..1721a3ff7b 100644 --- a/front_end/changes/module.json +++ b/front_end/changes/module.json @@ -38,5 +38,6 @@ "resources": [ "changesView.css", "changesSidebar.css" - ] -} + ], + "skip_rollup": true +} \ No newline at end of file