MCPcopy Create free account
hub / github.com/SAP/ui5-builder / exportGlobalNames

Method exportGlobalNames

lib/lbt/bundle/Builder.js:534–543  ·  view source on GitHub ↗

* Create exports for globals * * @param {ModuleInfo} info

(info)

Source from the content-addressed store, hash-verified

532 * @param {ModuleInfo} info
533 */
534 exportGlobalNames(info) {
535 if ( !info || !info.exposedGlobals || !info.exposedGlobals.length ) {
536 return;
537 }
538 this.outW.ensureNewLine();
539 info.exposedGlobals.forEach( (globalName) => {
540 // Note: globalName can be assumed to be a valid identifier as it is used as variable name anyhow
541 this.writeWithSourceMap(`this.${globalName}=${globalName};\n`);
542 });
543 }
544
545 logStringBundlingError(moduleName) {
546 log.error(

Callers 1

writePreloadModuleMethod · 0.95

Calls 2

writeWithSourceMapMethod · 0.95
ensureNewLineMethod · 0.80

Tested by

no test coverage detected