node_modules/grunt-angular-builder/tasks/middleware/overrideDependencies.js
/**
 * Allows the setting of the main module's dependencies via Grunt configuration options and synthetizes that module's
 * declaration javascript code.
 * @constructor
 * @implements {MiddlewareInterface}
 * @param {Context} context The execution context for the middleware stack.
 */
Allows the setting of the main module's dependencies via Grunt configuration options and synthetizes that module's
declaration javascript code.
@constructor
@implements {MiddlewareInterface}
@param {Context} context The execution context for the middleware stack.
Allows the setting of the main module ' s dependencies via Grunt configuration options and synthetizes that module ' s declaration javascript code . @constructor @implements { MiddlewareInterface } @param { Context } context The execution context for the middleware stack .
function OverrideDependenciesMiddleware (context)
{
  var options = context.options.overrideDependencies
    , enabled = options.dependencies && options.dependencies.length;
  this.analyze = function (filesArray)
  {
    if (!enabled) return;
    var mainModuleName = context.options.mainModule;
    var mainModule = context.modules[mainModuleName] = new ModuleDef (mainModuleName);
    mainModule.requires = options.dependencies;
    mainModule.head = ' ';
  };
  this.trace = function (module)
  {
  };
  this.build = function (targetScript)
  {
    if (!enabled) return;
    if (context.options.debugBuild && context.options.debugBuild.enabled) {
      var declaration = sprintf ("angular.module('%',%);",
        context.options.mainModule,
        util.toQuotedList (options.dependencies)
      );
      context.appendOutput += sprintf ('<script>%</script>', declaration);
    }
  };
}
function OverrideDependenciesMiddleware ( context ) { var options = context . options . overrideDependencies , enabled = options . dependencies && options . dependencies . length ; this . analyze = function ( filesArray ) { if ( ! enabled ) return ; var mainModuleName = context . options . mainModule ; var mainModule = context . modules [ mainModuleName ] = new ModuleDef ( mainModuleName ) ; mainModule . requires = options . dependencies ; mainModule . head = ' ' ; } ; this . trace = function ( module ) { } ; this . build = function ( targetScript ) { if ( ! enabled ) return ; if ( context . options . debugBuild && context . options . debugBuild . enabled ) { var declaration = sprintf ( "angular.module('%',%);" , context . options . mainModule , util . toQuotedList ( options . dependencies ) ) ; context . appendOutput += sprintf ( '<script>%</script>' , declaration ) ; } } ; }
Allows the setting of the main module's dependencies via Grunt configuration options and synthetizes that module's
 declaration javascript code.
Allows the setting of the main module ' s dependencies via Grunt configuration options and synthetizes that module ' s declaration javascript code .
/* jshint unused: vars */ //-------------------------------------------------------------------------------------------------------------------- // PUBLIC API //-------------------------------------------------------------------------------------------------------------------- /* jshint unused: vars */ // Must set head to a non-empty string to mark the module as being initialized. /* jshint unused: vars */ /* jshint unused: vars */