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

Method writeRawModule

lib/lbt/bundle/Builder.js:291–307  ·  view source on GitHub ↗
(moduleName, resource)

Source from the content-addressed store, hash-verified

289 }
290
291 async writeRawModule(moduleName, resource) {
292 this.outW.ensureNewLine();
293 let moduleContent = (await resource.buffer()).toString();
294 moduleContent = removeHashbang(moduleContent);
295 if (this.options.sourceMap) {
296 let moduleSourceMap;
297 ({moduleContent, moduleSourceMap} =
298 await this.getSourceMapForModule({
299 moduleName,
300 moduleContent,
301 resourcePath: resource.getPath()
302 }));
303 this.addSourceMap(moduleName, moduleSourceMap);
304 }
305 this.outW.write(moduleContent);
306 this.outW.ensureNewLine();
307 }
308
309 async writePreloadFunction(section) {
310 const outW = this.outW;

Callers 1

writeRawMethod · 0.95

Calls 8

getSourceMapForModuleMethod · 0.95
addSourceMapMethod · 0.95
removeHashbangFunction · 0.90
ensureNewLineMethod · 0.80
getPathMethod · 0.80
writeMethod · 0.80
toStringMethod · 0.45
bufferMethod · 0.45

Tested by

no test coverage detected