tasks/angular-builder.js
function traceModule (moduleName, context, processHook)
  {
    var module = context.modules[moduleName];
    if (!module)
      fatal ('Module <cyan>%</cyan> was not found.', moduleName);
    // Ignore the module if it's external.
    if (module.external)
      return;
    // Include required submodules first.
    context.trigger (ContextEvent.ON_BEFORE_DEPS, [module]);
    module.requires.forEach (function (modName)
    {
      traceModule (modName, context, processHook);
    });
    // Ignore references to already loaded modules or to explicitly excluded modules.
    if (!context.loaded[module.name] && !~context.options.excludedModules.indexOf (module.name)) {
      info ('Including module <cyan>%</cyan>.', moduleName);
      context.loaded[module.name] = true;
      processHook (module);
    }
  }
function traceModule (moduleName, context, processHook)
  {
    var module = context.modules[moduleName];
    if (!module)
      fatal ('Module <cyan>%</cyan> was not found.', moduleName);
    // Ignore the module if it's external.
    if (module.external)
      return;
    // Include required submodules first.
    context.trigger (ContextEvent.ON_BEFORE_DEPS, [module]);
    module.requires.forEach (function (modName)
    {
      traceModule (modName, context, processHook);
    });
    // Ignore references to already loaded modules or to explicitly excluded modules.
    if (!context.loaded[module.name] && !~context.options.excludedModules.indexOf (module.name)) {
      info ('Including module <cyan>%</cyan>.', moduleName);
      context.loaded[module.name] = true;
      processHook (module);
    }
  }
function traceModule ( moduleName , context , processHook ) { var module = context . modules [ moduleName ] ; if ( ! module ) fatal ( 'Module <cyan>%</cyan> was not found.' , moduleName ) ; // Ignore the module if it's external. if ( module . external ) return ; // Include required submodules first. context . trigger ( ContextEvent . ON_BEFORE_DEPS , [ module ] ) ; module . requires . forEach ( function ( modName ) { traceModule ( modName , context , processHook ) ; } ) ; // Ignore references to already loaded modules or to explicitly excluded modules. if ( ! context . loaded [ module . name ] && ! ~ context . options . excludedModules . indexOf ( module . name ) ) { info ( 'Including module <cyan>%</cyan>.' , moduleName ) ; context . loaded [ module . name ] = true ; processHook ( module ) ; } }
Traces a dependency graph for the specified module and calls the given callback
to process each required module in the correct loading order.
@param {string} moduleName
@param {Context} context The execution context for the middleware stack.
@param {function(ModuleDef)} processHook
Traces a dependency graph for the specified module and calls the given callback to process each required module in the correct loading order .