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

Method onSapUiRequireSync

lib/lbt/analyzer/JSModuleAnalyzer.js:653–669  ·  view source on GitHub ↗
(node, conditional)

Source from the content-addressed store, hash-verified

651 }
652
653 function onSapUiRequireSync(node, conditional) {
654 const args = node.arguments;
655 const nArgs = args.length;
656 const i = 0;
657
658 if ( i < nArgs ) {
659 const value = getStringValue(args[i]);
660 if ( value !== undefined ) {
661 // sap.ui.requireSync does not support relative dependencies
662 const moduleName = fromRequireJSName( value );
663 info.addDependency(moduleName, conditional);
664 } else {
665 log.verbose(`sap.ui.requireSync: Cannot evaluate dynamic arguments: ${args[i] && args[i].type}`);
666 info.dynamicDependencies = true;
667 }
668 }
669 }
670
671 function onSapUiPredefine(predefineCall, conditional) {
672 const args = predefineCall.arguments;

Callers

nothing calls this directly

Calls 3

getStringValueFunction · 0.90
fromRequireJSNameFunction · 0.90
addDependencyMethod · 0.80

Tested by

no test coverage detected