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

Method writeRaw

lib/lbt/bundle/Builder.js:268–289  ·  view source on GitHub ↗
(section)

Source from the content-addressed store, hash-verified

266
267 // TODO check that there are only JS modules contained
268 async writeRaw(section) {
269 // write all modules in sequence
270 for ( const moduleName of section.modules ) {
271 const resource = await this.pool.findResourceWithInfo(moduleName);
272 if ( resource != null ) {
273 this.outW.startSegment(moduleName);
274 this.outW.ensureNewLine();
275 this.outW.writeln("//@ui5-bundle-raw-include " + moduleName);
276 await this.writeRawModule(moduleName, resource);
277 const compressedSize = this.outW.endSegment();
278 log.verbose(` ${moduleName} (${resource.info != null ? resource.info.size : -1},${compressedSize})`);
279 if ( section.declareRawModules ) {
280 this.missingRawDeclarations.push(moduleName);
281 }
282 if ( moduleName === MODULE__JQUERY_SAP_GLOBAL ) {
283 this.jqglobalAvailable = true;
284 }
285 } else {
286 log.error(` Could not find module ${moduleName}`);
287 }
288 }
289 }
290
291 async writeRawModule(moduleName, resource) {
292 this.outW.ensureNewLine();

Callers 1

addSectionMethod · 0.95

Calls 6

writeRawModuleMethod · 0.95
findResourceWithInfoMethod · 0.80
startSegmentMethod · 0.80
ensureNewLineMethod · 0.80
writelnMethod · 0.80
endSegmentMethod · 0.80

Tested by

no test coverage detected