Revert "Backed out changeset 7f51bc3757d9 (bug 1497839) for ESlint failure at build-debugger.js. CLOSED TREE"
authorJason Laster <jlaster@mozilla.com>
Wed, 06 Mar 2019 05:10:25 +0000
changeset 520429 c36dc28ad5d0fd3fb3819471f6b05a8fa6646688
parent 520428 b2fb7cd41c796eabae8e4310aa34ea23ef858714
child 520430 e93f4871731b8e658c7febf013cd985738ad1435
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1497839
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Revert "Backed out changeset 7f51bc3757d9 (bug 1497839) for ESlint failure at build-debugger.js. CLOSED TREE" This reverts commit 2b1fea9435191242f8aadc04da3ed1b0e0d99b02. Bug 1497839 - fix eslint issues for babel build. r=jlast Differential Revision: https://phabricator.services.mozilla.com/D22252
devtools/client/debugger/new/build/babel.js
devtools/client/debugger/new/build/copy-module.js
devtools/client/debugger/new/moz.build
devtools/client/debugger/new/node-templates.mozbuild
devtools/client/debugger/new/src/actions/ast/moz.build
devtools/client/debugger/new/src/actions/breakpoints/moz.build
devtools/client/debugger/new/src/actions/moz.build
devtools/client/debugger/new/src/actions/pause/moz.build
devtools/client/debugger/new/src/actions/sources/moz.build
devtools/client/debugger/new/src/actions/utils/middleware/moz.build
devtools/client/debugger/new/src/actions/utils/moz.build
devtools/client/debugger/new/src/client/chrome/moz.build
devtools/client/debugger/new/src/client/firefox/moz.build
devtools/client/debugger/new/src/client/moz.build
devtools/client/debugger/new/src/components/Editor/Preview/moz.build
devtools/client/debugger/new/src/components/Editor/menus/moz.build
devtools/client/debugger/new/src/components/Editor/moz.build
devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
devtools/client/debugger/new/src/components/moz.build
devtools/client/debugger/new/src/components/shared/Button/moz.build
devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
devtools/client/debugger/new/src/components/shared/moz.build
devtools/client/debugger/new/src/moz.build
devtools/client/debugger/new/src/reducers/moz.build
devtools/client/debugger/new/src/selectors/moz.build
devtools/client/debugger/new/src/utils/breakpoint/moz.build
devtools/client/debugger/new/src/utils/editor/moz.build
devtools/client/debugger/new/src/utils/moz.build
devtools/client/debugger/new/src/utils/pause/frames/moz.build
devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
devtools/client/debugger/new/src/utils/pause/moz.build
devtools/client/debugger/new/src/utils/pause/scopes/moz.build
devtools/client/debugger/new/src/utils/sources-tree/moz.build
devtools/client/debugger/new/src/workers/moz.build
devtools/client/debugger/new/src/workers/parser/moz.build
devtools/client/debugger/new/src/workers/pretty-print/moz.build
devtools/client/debugger/new/src/workers/search/moz.build
devtools/client/shared/build/babel.js
devtools/client/shared/build/build-debugger.js
devtools/client/shared/build/build.js
devtools/client/shared/build/node-templates.mozbuild
python/mozbuild/mozbuild/action/node.py
tools/rewriting/ThirdPartyPaths.txt
--- a/devtools/client/debugger/new/moz.build
+++ b/devtools/client/debugger/new/moz.build
@@ -4,13 +4,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
   'dist',
   'images',
   'src',
 ]
 
-include('node-templates.mozbuild')
+include('../../shared/build/node-templates.mozbuild')
 
 DevToolsModules(
     'panel.js',
 )
deleted file mode 100644
--- a/devtools/client/debugger/new/node-templates.mozbuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-@template
-def DebuggerModules(*modules):
-    # Compute where to put transpiled files into omni.ja package
-    # All DevTools modules are used via resource://devtools/ URI
-    # See devtools/shared/jar.mn for how this resource is mapped into jar package.
-    base = FINAL_TARGET_FILES.chrome.devtools.modules
-
-    # Now, navigate to the right sub-directory into devtools root modules folder
-    for dir in RELATIVEDIR.split('/'):
-        base = base[dir]
-
-    size = 0
-    for m in modules:
-        base += ["!" + m]
-        size += 1
-
-    if size == 0:
-      return
-
-    # For the same reason as https://searchfox.org/mozilla-central/source/mobile/android/base/moz.build#180-184
-    # we have to insert a first entry as recursivemake overrides the first entry and we end up with empty files
-    # for the first file only.
-    outputs = tuple(("node.stub",) + modules)
-    GENERATED_FILES += [outputs]
-
-    bundle = GENERATED_FILES[outputs]
-    bundle.script = '/python/mozbuild/mozbuild/action/node.py:generate'
-    bundle.inputs = ['/devtools/client/debugger/new/build/copy-module.js']
-    bundle.inputs.extend(modules)
--- a/devtools/client/debugger/new/src/actions/ast/moz.build
+++ b/devtools/client/debugger/new/src/actions/ast/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'setInScopeLines.js',
 )
--- a/devtools/client/debugger/new/src/actions/breakpoints/moz.build
+++ b/devtools/client/debugger/new/src/actions/breakpoints/moz.build
@@ -2,15 +2,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'addBreakpoint.js',
     'breakpointPositions.js',
     'index.js',
     'remapLocations.js',
     'syncBreakpoint.js',
 )
--- a/devtools/client/debugger/new/src/actions/moz.build
+++ b/devtools/client/debugger/new/src/actions/moz.build
@@ -6,17 +6,17 @@
 DIRS += [
     'ast',
     'breakpoints',
     'pause',
     'sources',
     'utils',
 ]
 
-DebuggerModules(
+CompiledModules(
     'ast.js',
     'debuggee.js',
     'event-listeners.js',
     'expressions.js',
     'file-search.js',
     'index.js',
     'navigation.js',
     'preview.js',
--- a/devtools/client/debugger/new/src/actions/pause/moz.build
+++ b/devtools/client/debugger/new/src/actions/pause/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'breakOnNext.js',
     'commands.js',
     'continueToHere.js',
     'fetchScopes.js',
     'index.js',
     'mapFrames.js',
     'mapScopes.js',
     'paused.js',
--- a/devtools/client/debugger/new/src/actions/sources/moz.build
+++ b/devtools/client/debugger/new/src/actions/sources/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'blackbox.js',
     'index.js',
     'loadSourceText.js',
     'newSources.js',
     'prettyPrint.js',
     'select.js',
 )
--- a/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
+++ b/devtools/client/debugger/new/src/actions/utils/middleware/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'history.js',
     'log.js',
     'promise.js',
     'thunk.js',
     'timing.js',
     'wait-service.js',
 )
--- a/devtools/client/debugger/new/src/actions/utils/moz.build
+++ b/devtools/client/debugger/new/src/actions/utils/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'middleware',
 ]
 
-DebuggerModules(
+CompiledModules(
     'create-store.js',
 )
--- a/devtools/client/debugger/new/src/client/chrome/moz.build
+++ b/devtools/client/debugger/new/src/client/chrome/moz.build
@@ -2,13 +2,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'commands.js',
     'create.js',
     'events.js',
 )
--- a/devtools/client/debugger/new/src/client/firefox/moz.build
+++ b/devtools/client/debugger/new/src/client/firefox/moz.build
@@ -2,14 +2,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'commands.js',
     'create.js',
     'events.js',
     'workers.js',
 )
--- a/devtools/client/debugger/new/src/client/moz.build
+++ b/devtools/client/debugger/new/src/client/moz.build
@@ -3,13 +3,13 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'chrome',
     'firefox',
 ]
 
-DebuggerModules(
+CompiledModules(
     'chrome.js',
     'firefox.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/Preview/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/Preview/moz.build
@@ -2,12 +2,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
     'Popup.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/menus/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/menus/moz.build
@@ -2,13 +2,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'breakpoints.js',
     'editor.js',
     'source.js',
 )
--- a/devtools/client/debugger/new/src/components/Editor/moz.build
+++ b/devtools/client/debugger/new/src/components/Editor/moz.build
@@ -3,17 +3,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'menus',
     'Preview',
 ]
 
-DebuggerModules(
+CompiledModules(
     'Breakpoint.js',
     'Breakpoints.js',
     'ColumnBreakpoint.js',
     'ColumnBreakpoints.js',
     'ConditionalPanel.js',
     'DebugLine.js',
     'EditorMenu.js',
     'EmptyLines.js',
--- a/devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
+++ b/devtools/client/debugger/new/src/components/PrimaryPanes/moz.build
@@ -2,15 +2,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
     'Outline.js',
     'OutlineFilter.js',
     'SourcesTree.js',
     'SourcesTreeItem.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'Breakpoint.js',
     'BreakpointHeading.js',
     'BreakpointHeadingsContextMenu.js',
     'BreakpointsContextMenu.js',
     'ExceptionOption.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Frames/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'Frame.js',
     'FrameIndent.js',
     'FrameMenu.js',
     'Group.js',
     'index.js',
     'WhyPaused.js',
 )
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/moz.build
@@ -3,17 +3,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'Breakpoints',
     'Frames',
 ]
 
-DebuggerModules(
+CompiledModules(
     'CommandBar.js',
     'EventListeners.js',
     'Expressions.js',
     'index.js',
     'Scopes.js',
     'UtilsBar.js',
     'Worker.js',
     'Workers.js',
--- a/devtools/client/debugger/new/src/components/moz.build
+++ b/devtools/client/debugger/new/src/components/moz.build
@@ -5,16 +5,16 @@
 
 DIRS += [
     'Editor',
     'PrimaryPanes',
     'SecondaryPanes',
     'shared',
 ]
 
-DebuggerModules(
+CompiledModules(
     'A11yIntention.js',
     'App.js',
     'ProjectSearch.js',
     'QuickOpenModal.js',
     'ShortcutsModal.js',
     'WelcomeBox.js',
 )
--- a/devtools/client/debugger/new/src/components/shared/Button/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/Button/moz.build
@@ -2,14 +2,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'CloseButton.js',
     'CommandBarButton.js',
     'index.js',
     'PaneToggleButton.js',
 )
--- a/devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/Button/styles/moz.build
@@ -2,13 +2,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'CloseButton.css',
     'CommandBarButton.css',
     'PaneToggleButton.css',
 )
--- a/devtools/client/debugger/new/src/components/shared/moz.build
+++ b/devtools/client/debugger/new/src/components/shared/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'Button',
 ]
 
-DebuggerModules(
+CompiledModules(
     'AccessibleImage.js',
     'Accordion.js',
     'Badge.js',
     'BracketArrow.js',
     'Dropdown.js',
     'ManagedTree.js',
     'Modal.js',
     'Popover.js',
--- a/devtools/client/debugger/new/src/moz.build
+++ b/devtools/client/debugger/new/src/moz.build
@@ -8,13 +8,13 @@ DIRS += [
     'client',
     'components',
     'reducers',
     'selectors',
     'utils',
     'workers',
 ]
 
-DebuggerModules(
+CompiledModules(
     'main.development.js',
     'main.js',
     'vendors.js',
 )
--- a/devtools/client/debugger/new/src/reducers/moz.build
+++ b/devtools/client/debugger/new/src/reducers/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'ast.js',
     'async-requests.js',
     'breakpoints.js',
     'debuggee.js',
     'event-listeners.js',
     'expressions.js',
     'file-search.js',
     'index.js',
--- a/devtools/client/debugger/new/src/selectors/moz.build
+++ b/devtools/client/debugger/new/src/selectors/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'breakpointAtLocation.js',
     'breakpoints.js',
     'breakpointSources.js',
     'getCallStackFrames.js',
     'inComponent.js',
     'index.js',
     'isSelectedFrameVisible.js',
     'visibleBreakpoints.js',
--- a/devtools/client/debugger/new/src/utils/breakpoint/moz.build
+++ b/devtools/client/debugger/new/src/utils/breakpoint/moz.build
@@ -2,13 +2,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'astBreakpointLocation.js',
     'breakpointPositions.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/utils/editor/moz.build
+++ b/devtools/client/debugger/new/src/utils/editor/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'create-editor.js',
     'get-expression.js',
     'get-token-location.js',
     'index.js',
     'source-documents.js',
     'source-editor.js',
     'source-search.js',
     'token-events.js',
--- a/devtools/client/debugger/new/src/utils/moz.build
+++ b/devtools/client/debugger/new/src/utils/moz.build
@@ -5,17 +5,17 @@
 
 DIRS += [
     'breakpoint',
     'editor',
     'pause',
     'sources-tree',
 ]
 
-DebuggerModules(
+CompiledModules(
     'assert.js',
     'ast.js',
     'asyncStoreHelper.js',
     'bootstrap.js',
     'build-query.js',
     'clipboard.js',
     'connect.js',
     'dbg.js',
--- a/devtools/client/debugger/new/src/utils/pause/frames/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/frames/moz.build
@@ -2,16 +2,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'annotateFrames.js',
     'collapseFrames.js',
     'displayName.js',
     'getFrameUrl.js',
     'getLibraryFromUrl.js',
     'index.js',
 )
--- a/devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/mapScopes/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'buildGeneratedBindingList.js',
     'filtering.js',
     'findGeneratedBindingFromPosition.js',
     'getApplicableBindingsForOriginalPosition.js',
     'index.js',
     'locColumn.js',
     'mappingContains.js',
     'positionCmp.js',
--- a/devtools/client/debugger/new/src/utils/pause/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/moz.build
@@ -4,12 +4,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'frames',
     'mapScopes',
     'scopes',
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
     'why.js',
 )
--- a/devtools/client/debugger/new/src/utils/pause/scopes/moz.build
+++ b/devtools/client/debugger/new/src/utils/pause/scopes/moz.build
@@ -2,14 +2,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'getScope.js',
     'getVariables.js',
     'index.js',
     'utils.js',
 )
--- a/devtools/client/debugger/new/src/utils/sources-tree/moz.build
+++ b/devtools/client/debugger/new/src/utils/sources-tree/moz.build
@@ -2,17 +2,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'addToTree.js',
     'collapseTree.js',
     'createTree.js',
     'formatTree.js',
     'getDirectories.js',
     'getURL.js',
     'index.js',
     'sortTree.js',
--- a/devtools/client/debugger/new/src/workers/moz.build
+++ b/devtools/client/debugger/new/src/workers/moz.build
@@ -4,11 +4,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'parser',
     'pretty-print',
     'search',
 ]
 
-DebuggerModules(
+CompiledModules(
 
 )
--- a/devtools/client/debugger/new/src/workers/parser/moz.build
+++ b/devtools/client/debugger/new/src/workers/parser/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
 )
--- a/devtools/client/debugger/new/src/workers/pretty-print/moz.build
+++ b/devtools/client/debugger/new/src/workers/pretty-print/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
 )
--- a/devtools/client/debugger/new/src/workers/search/moz.build
+++ b/devtools/client/debugger/new/src/workers/search/moz.build
@@ -2,11 +2,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
 
 ]
 
-DebuggerModules(
+CompiledModules(
     'index.js',
 )
rename from devtools/client/debugger/new/build/babel.js
rename to devtools/client/shared/build/babel.js
rename from devtools/client/debugger/new/build/copy-module.js
rename to devtools/client/shared/build/build-debugger.js
--- a/devtools/client/debugger/new/build/copy-module.js
+++ b/devtools/client/shared/build/build-debugger.js
@@ -1,22 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+/* globals process, __filename, __dirname */
+
+"use strict";
 
 const Babel = require("./babel");
 const fs = require("fs");
 const _path = require("path");
-const { execFileSync } = require("child_process");
 
 const EXCLUDED_FILES = {
   "../assets/panel/debugger.properties": "devtools/shared/flags",
   "devtools-connection": "devtools/shared/flags",
   "chrome-remote-interface": "devtools/shared/flags",
-  "devtools-launchpad": "devtools/shared/flags"
+  "devtools-launchpad": "devtools/shared/flags",
 };
 
 const mappings =  Object.assign(
   {
     "./source-editor": "devtools/client/shared/sourceeditor/editor",
     "../editor/source-editor": "devtools/client/shared/sourceeditor/editor",
     "./test-flag": "devtools/shared/flags",
     "./fronts-device": "devtools/shared/fronts/device",
@@ -25,73 +27,69 @@ const mappings =  Object.assign(
     react: "devtools/client/shared/vendor/react",
     "react-dom": "devtools/client/shared/vendor/react-dom",
     "react-dom-factories": "devtools/client/shared/vendor/react-dom-factories",
     "react-redux": "devtools/client/shared/vendor/react-redux",
     redux: "devtools/client/shared/vendor/redux",
     "prop-types": "devtools/client/shared/vendor/react-prop-types",
     "devtools-services": "Services",
     "wasmparser/dist/WasmParser": "devtools/client/shared/vendor/WasmParser",
-    "wasmparser/dist/WasmDis": "devtools/client/shared/vendor/WasmDis"
+    "wasmparser/dist/WasmDis": "devtools/client/shared/vendor/WasmDis",
   },
   EXCLUDED_FILES
 );
 
 const mappingValues = Object.values(mappings);
 
 // Add two additional mappings that cannot be reused when creating the
 // webpack bundles.
 mappings["devtools-reps"] = "devtools/client/shared/components/reps/reps.js";
 mappings["devtools-source-map"] = "devtools/client/shared/source-map/index.js";
 
 function isRequire(t, node) {
   return node && t.isCallExpression(node) && node.callee.name == "require";
 }
 
-function isImport(t, node) {
-  return node && t.isImportDeclaration(node);
-}
-
 // List of vendored modules.
 // Should be synchronized with vendors.js
 const VENDORS = [
   "classnames",
   "devtools-components",
   "devtools-config",
   "devtools-contextmenu",
   "devtools-environment",
   "devtools-modules",
   "devtools-splitter",
   "devtools-utils",
   "fuzzaldrin-plus",
   "lodash-move",
   "react-aria-components/src/tabs",
   "react-transition-group/Transition",
   "reselect",
-  "Svg"
+  "Svg",
 ];
 
 const moduleMapping = {
   Telemetry: "devtools/client/shared/telemetry",
-  asyncStorage: "devtools/shared/async-storage"
+  asyncStorage: "devtools/shared/async-storage",
 };
 
 /*
- * Updates devtools-modules imports such as
- * `import { Telemetry } from "devtools-modules"`
- * so that we can customize how we resolve certain modules in the package
- *
- * In the case of multiple declarations we need to move
- * the telemetry module into its own import.
- */
+* Updates devtools-modules imports such as
+* `import { Telemetry } from "devtools-modules"`
+* so that we can customize how we resolve certain modules in the package
+*
+* In the case of multiple declarations we need to move
+* the telemetry module into its own import.
+*/
 function updateDevtoolsModulesImport(path, t) {
   const specifiers = path.node.specifiers;
 
   for (let i = 0; i < specifiers.length; i++) {
-    let specifier = specifiers[i];
+    const specifier = specifiers[i];
     const localName = specifier.local.name;
     if (localName in moduleMapping) {
       const newImport = t.importDeclaration(
         [t.importDefaultSpecifier(specifier.local)],
         t.stringLiteral(moduleMapping[localName])
       );
 
       if (specifiers.length > 1) {
@@ -103,19 +101,19 @@ function updateDevtoolsModulesImport(pat
           path.replaceWith(newImport);
         }
       }
     }
   }
 }
 
 /**
- * This Babel plugin is used to transpile a single Debugger module into a module that
- * can be loaded in Firefox via the regular DevTools loader.
- */
+* This Babel plugin is used to transpile a single Debugger module into a module that
+* can be loaded in Firefox via the regular DevTools loader.
+*/
 function transformMC({ types: t }) {
   return {
     visitor: {
       ModuleDeclaration(path, state) {
         const source = path.node.source;
         const value = source && source.value;
         if (value && value.includes(".css")) {
           path.remove();
@@ -190,50 +188,27 @@ function transformMC({ types: t }) {
         const depPath = _path.join(dir, `${value}.js`);
         const exists = fs.existsSync(depPath);
         if (
           !exists &&
           !value.endsWith("index") &&
           !(value.startsWith("devtools") || mappingValues.includes(value))
         ) {
           path.replaceWith(t.stringLiteral(`${value}/index`));
-          return;
         }
-      }
-    }
+      },
+    },
   };
-};
+}
 
 Babel.registerPlugin("transform-mc", transformMC);
 
-function transform(filePath) {
-  const doc = fs.readFileSync(filePath, "utf8");
-  const out = Babel.transform(doc, {
-    plugins: [
-			"transform-flow-strip-types",
-			"syntax-trailing-function-commas",
-			"transform-class-properties",
-			"transform-es2015-modules-commonjs",
-			"transform-react-jsx",
-      			"syntax-object-rest-spread",
-      ["transform-mc", { mappings, vendors: VENDORS, filePath }]
-    ]
-  });
-
-  return out.code;
-}
-
-const deps = [
-  __filename,
-  _path.resolve(__dirname, "babel.js")
-];
-
-for (let i = 2; i < process.argv.length; i++) {
-  const srcPath = process.argv[i];
-  const code = transform(srcPath);
-  const filePath = _path.basename(srcPath);
-  fs.writeFileSync(filePath, code);
-  deps.push(srcPath);
-}
-
-// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
-// calls this module, to report back the precise list of all dependencies.
-console.log(deps.map(file => "dep:" + file).join("\n"));
+module.exports = function(filePath) {
+  return [
+    "transform-flow-strip-types",
+    "syntax-trailing-function-commas",
+    "transform-class-properties",
+    "transform-es2015-modules-commonjs",
+    "transform-react-jsx",
+    "syntax-object-rest-spread",
+    ["transform-mc", { mappings, vendors: VENDORS, filePath }],
+  ];
+};
new file mode 100644
--- /dev/null
+++ b/devtools/client/shared/build/build.js
@@ -0,0 +1,45 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+/* globals process, __filename, __dirname */
+
+"use strict";
+
+const Babel = require("./babel");
+const fs = require("fs");
+const _path = require("path");
+
+const defaultPlugins = [
+  "transform-flow-strip-types",
+  "transform-class-properties",
+  "transform-react-jsx",
+];
+
+function transform(filePath) {
+// Use the extra plugins only for the debugger
+  const plugins = filePath.includes("devtools/client/debugger/new")
+    ? require("./build-debugger")(filePath)
+    : defaultPlugins;
+
+  const doc = fs.readFileSync(filePath, "utf8");
+  const out = Babel.transform(doc, { plugins });
+
+  return out.code;
+}
+
+const deps = [
+  __filename,
+  _path.resolve(__dirname, "babel.js"),
+];
+
+for (let i = 2; i < process.argv.length; i++) {
+  const srcPath = process.argv[i];
+  const code = transform(srcPath);
+  const filePath = _path.basename(srcPath);
+  fs.writeFileSync(filePath, code);
+  deps.push(srcPath);
+}
+
+// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
+// calls this module, to report back the precise list of all dependencies.
+console.log(deps.map(file => "dep:" + file).join("\n"));
new file mode 100644
--- /dev/null
+++ b/devtools/client/shared/build/node-templates.mozbuild
@@ -0,0 +1,41 @@
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+@template
+def CompiledModules(*modules):
+  # Compute where to put compiled files into omni.ja package
+  # All DevTools modules are used via resource://devtools/ URI
+  # See devtools/shared/jar.mn for how this resource is mapped into jar package.
+  base = FINAL_TARGET_FILES.chrome.devtools.modules
+
+  compiled_directory_whitelist = (
+    "devtools/client/debugger/new/src",
+  )
+
+  if not RELATIVEDIR.startswith(compiled_directory_whitelist):
+    error("File in directory provided to CompiledModules not allowed: " + RELATIVEDIR)
+
+  # Now, navigate to the right sub-directory into devtools root modules folder
+  for dir in RELATIVEDIR.split('/'):
+    base = base[dir]
+
+  size = 0
+  for m in modules:
+    base += ["!" + m]
+    size += 1
+
+  if size == 0:
+    return
+
+  # For the same reason as https://searchfox.org/mozilla-central/source/mobile/android/base/moz.build#180-184
+  # we have to insert a first entry as recursivemake overrides the first entry and we end up with empty files
+  # for the first file only.
+  outputs = tuple(("node.stub",) + modules)
+  GENERATED_FILES += [outputs]
+
+  bundle = GENERATED_FILES[outputs]
+  bundle.script = '/python/mozbuild/mozbuild/action/node.py:generate'
+  bundle.inputs = ['/devtools/client/shared/build/build.js',]
+  bundle.inputs.extend(modules)
--- a/python/mozbuild/mozbuild/action/node.py
+++ b/python/mozbuild/mozbuild/action/node.py
@@ -5,17 +5,17 @@
 from __future__ import absolute_import, unicode_literals, print_function
 
 import buildconfig
 import pipes
 import subprocess
 import sys
 
 SCRIPT_ALLOWLIST = [
-        buildconfig.topsrcdir + "/devtools/client/debugger/new/build/copy-module.js"
+        buildconfig.topsrcdir + "/devtools/client/shared/build/build.js"
     ]
 
 ALLOWLIST_ERROR = '''
 %s is not
 in SCRIPT_ALLOWLIST in python/mozbuild/mozbuild/action/node.py.
 Using NodeJS from moz.build is currently in beta, and node
 scripts to be executed need to be added to the allowlist and
 reviewed by a build peer so that we can get a better sense of
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -1,10 +1,11 @@
 browser/components/translation/cld2/
 db/sqlite3/src/
+devtools/client/shared/build/babel.js
 devtools/client/shared/sourceeditor/codemirror/
 devtools/client/shared/sourceeditor/tern/
 devtools/shared/heapsnapshot/CoreDump.pb.cc
 devtools/shared/heapsnapshot/CoreDump.pb.h
 dom/canvas/test/webgl-conf/checkout/closure-library/
 dom/media/gmp/rlz/
 dom/media/gmp/widevine-adapter/content_decryption_module.h
 dom/media/gmp/widevine-adapter/content_decryption_module_export.h