From 899893a60cc540b0b41953b884e5883f615aecf4 Mon Sep 17 00:00:00 2001 From: Jack Franklin Date: Thu, 30 Jul 2020 15:01:39 +0100 Subject: [PATCH] Migrate animation to devtools_entrypoint Bug: 1101738 Change-Id: I05f447baa9854b776821d97d6bde76a4f6d223a7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2329771 Commit-Queue: Jack Franklin Reviewed-by: Jan Scheffler Auto-Submit: Jack Franklin --- all_devtools_modules.gni | 10 +++--- devtools_module_entrypoints.gni | 2 +- front_end/BUILD.gn | 1 + .../animation/AnimationGroupPreviewUI.js | 2 ++ front_end/animation/AnimationModel.js | 3 ++ .../animation/AnimationScreenshotPopover.js | 2 ++ front_end/animation/AnimationTimeline.js | 2 ++ front_end/animation/AnimationUI.js | 2 ++ front_end/animation/BUILD.gn | 32 +++++++++++++++++++ front_end/animation/module.json | 3 +- 10 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 front_end/animation/BUILD.gn diff --git a/all_devtools_modules.gni b/all_devtools_modules.gni index f5398cf3e8..0bd01075f2 100644 --- a/all_devtools_modules.gni +++ b/all_devtools_modules.gni @@ -5,11 +5,6 @@ import("./scripts/build/ninja/vars.gni") all_devtools_module_sources = [ - "animation/AnimationGroupPreviewUI.js", - "animation/AnimationModel.js", - "animation/AnimationScreenshotPopover.js", - "animation/AnimationTimeline.js", - "animation/AnimationUI.js", "browser_debugger/DOMBreakpointsSidebarPane.js", "browser_debugger/EventListenerBreakpointsSidebarPane.js", "browser_debugger/ObjectEventListenersSidebarPane.js", @@ -227,6 +222,11 @@ all_typescript_module_sources = [ "accessibility/AccessibilitySidebarView.js", "accessibility/AccessibilityStrings.js", "accessibility/AccessibilitySubPane.js", + "animation/AnimationGroupPreviewUI.js", + "animation/AnimationModel.js", + "animation/AnimationScreenshotPopover.js", + "animation/AnimationTimeline.js", + "animation/AnimationUI.js", "bindings/BlackboxManager.js", "bindings/BreakpointManager.js", "bindings/CSSWorkspaceBinding.js", diff --git a/devtools_module_entrypoints.gni b/devtools_module_entrypoints.gni index 0ddbfda3ec..1b128cdf88 100644 --- a/devtools_module_entrypoints.gni +++ b/devtools_module_entrypoints.gni @@ -8,7 +8,6 @@ devtools_module_entrypoint_sources = [ "RuntimeInstantiator.js", "accessibility/accessibility-legacy.js", "animation/animation-legacy.js", - "animation/animation.js", "bindings/bindings-legacy.js", "browser_debugger/browser_debugger-legacy.js", "browser_debugger/browser_debugger.js", @@ -117,6 +116,7 @@ foreach(module, devtools_module_entrypoint_sources) { generated_typescript_entrypoint_sources = [ "$resources_out_dir/accessibility/accessibility.js", + "$resources_out_dir/animation/animation.js", "$resources_out_dir/bindings/bindings.js", "$resources_out_dir/browser_sdk/browser_sdk.js", "$resources_out_dir/client_variations/client_variations.js", diff --git a/front_end/BUILD.gn b/front_end/BUILD.gn index 52baebc5b8..8b57d8f7b6 100644 --- a/front_end/BUILD.gn +++ b/front_end/BUILD.gn @@ -10,6 +10,7 @@ group("front_end") { ":front_end_html_entrypoints", ":ts_library-verification", "accessibility:bundle", + "animation:bundle", "bindings:bundle", "browser_sdk:bundle", "client_variations:bundle", diff --git a/front_end/animation/AnimationGroupPreviewUI.js b/front_end/animation/AnimationGroupPreviewUI.js index 7d22845945..0dcb1bea99 100644 --- a/front_end/animation/AnimationGroupPreviewUI.js +++ b/front_end/animation/AnimationGroupPreviewUI.js @@ -1,6 +1,8 @@ // Copyright (c) 2015 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. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks import {AnimationGroup} from './AnimationModel.js'; // eslint-disable-line no-unused-vars import {AnimationUI} from './AnimationUI.js'; diff --git a/front_end/animation/AnimationModel.js b/front_end/animation/AnimationModel.js index e41b12bb26..7df4b8552b 100644 --- a/front_end/animation/AnimationModel.js +++ b/front_end/animation/AnimationModel.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 SDK from '../sdk/sdk.js'; /** diff --git a/front_end/animation/AnimationScreenshotPopover.js b/front_end/animation/AnimationScreenshotPopover.js index fab5f95a19..e35bbde49f 100644 --- a/front_end/animation/AnimationScreenshotPopover.js +++ b/front_end/animation/AnimationScreenshotPopover.js @@ -1,6 +1,8 @@ // Copyright (c) 2015 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. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks import * as UI from '../ui/ui.js'; diff --git a/front_end/animation/AnimationTimeline.js b/front_end/animation/AnimationTimeline.js index 74adc308b7..35bdd77fe9 100644 --- a/front_end/animation/AnimationTimeline.js +++ b/front_end/animation/AnimationTimeline.js @@ -1,6 +1,8 @@ // Copyright (c) 2015 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. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks import * as Common from '../common/common.js'; import * as Host from '../host/host.js'; diff --git a/front_end/animation/AnimationUI.js b/front_end/animation/AnimationUI.js index 55c9e542f6..41163bd266 100644 --- a/front_end/animation/AnimationUI.js +++ b/front_end/animation/AnimationUI.js @@ -1,6 +1,8 @@ // Copyright (c) 2015 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. +// @ts-nocheck +// TODO(crbug.com/1011811): Enable TypeScript compiler checks import * as Common from '../common/common.js'; import * as InlineEditor from '../inline_editor/inline_editor.js'; diff --git a/front_end/animation/BUILD.gn b/front_end/animation/BUILD.gn new file mode 100644 index 0000000000..7f17977af8 --- /dev/null +++ b/front_end/animation/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("animation") { + sources = [ + "AnimationGroupPreviewUI.js", + "AnimationModel.js", + "AnimationScreenshotPopover.js", + "AnimationTimeline.js", + "AnimationUI.js", + ] + + deps = [ + "../common:bundle", + "../host:bundle", + "../inline_editor:bundle", + "../platform:bundle", + "../sdk:bundle", + "../ui:bundle", + ] +} + +devtools_entrypoint("bundle") { + entrypoint = "animation.js" + is_legacy_javascript_entrypoint = [ "crbug.com/1011811" ] + + deps = [ ":animation" ] +} diff --git a/front_end/animation/module.json b/front_end/animation/module.json index 7e6527ea2e..3228510a7c 100644 --- a/front_end/animation/module.json +++ b/front_end/animation/module.json @@ -25,5 +25,6 @@ "resources": [ "animationScreenshotPopover.css", "animationTimeline.css" - ] + ], + "skip_rollup": true }