Closure was unhappy with the `Object.assign` solution. Instead, use
individual assignments and add the relevant comments, so that Closure
can understand what is going on.
Sample output:
```
/*Legacy exported object*/
self.UI = self.UI || {};
/*Legacy exported object*/
UI = UI || {};
//TODO(http://crbug.com/1006759): Add type information if necessary
UI.TextEditor = TextEditor;
//TODO(http://crbug.com/1006759): Add type information if necessary
UI.TextEditor.prototype = prototype;
/** @enum {symbol} */
UI.TextEditor.Events = Events;
```
Bug: 1006759
Change-Id: Ib0e571cc027f544b316a3e3ccf8c3d606273d887
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819248
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#698878}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c1c9f965bfcf2dbcd8f868414874c085f4ff9515
Example invocation of the script:
./refactor-folder-to-es-modules.sh ui
It will consequently refactor all files in the ui folder to JavaScript
modules. It will also update the BUILD.gn variables to remove the
references from the old all_devtools_files into the new modules
variables.
Change-Id: I35ad6360b15d1aff250afffc8a28774c4e8cc1ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808867
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#697602}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6d48f36bc75c558ac1ee899ccb20877b800e9410