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