Replace UI5 globals with sap.ui.define dependencies

Proprietary

Replaces access to UI5 through the sap global with a sap.ui.define dependency on the module the global names, bound to a factory parameter — new sap.m.Button() becomes a dependency on sap/m/Button and a new Button(). Only the modules OpenUI5 declares are rewritten, so an application's own namespace, a closed-source library and the launchpad's sap.ushell globals are left alone. A global naming a library's enum or datatype takes a dependency on the library module that exports it.

io.moderne.javascript.ui5.ReplaceGlobalsWithModules
mod run . --recipe=io.moderne.javascript.ui5.ReplaceGlobalsWithModules

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.