tasks/lib/types.js
function Context (grunt, task, defaultOptions)
{
  this.grunt = grunt;
  this.options = extend ({}, defaultOptions, task.options ());
  switch (this.options.buildMode) {
    case 'release':
      this.options.debugBuild.enabled = false;
      this.options.releaseBuild.enabled = true;
      break;
    case 'debug':
      this.options.debugBuild.enabled = true;
      this.options.releaseBuild.enabled = false;
  }
  if (task.flags.debug !== undefined || grunt.option ('build') === 'debug') {
    this.options.debugBuild.enabled = true;
    this.options.releaseBuild.enabled = false;
  }
  this.verbose = grunt.option ('verbose');
  // Clone the external modules and use it as a starting point.
  this.modules = extend ({}, this._setupExternalModules ());
  // Reset tracer.
  this.loaded = {};
  this.outputtedFiles = {};
  this.filesRefCount = {};
  // Reset the scripts list to a clone of the `require` option or to an empty list.
  this.standaloneScripts = (this.options.require || []).slice ();
  this.shared = {};
  this._events = {};
}
function Context (grunt, task, defaultOptions)
{
  this.grunt = grunt;
  this.options = extend ({}, defaultOptions, task.options ());
  switch (this.options.buildMode) {
    case 'release':
      this.options.debugBuild.enabled = false;
      this.options.releaseBuild.enabled = true;
      break;
    case 'debug':
      this.options.debugBuild.enabled = true;
      this.options.releaseBuild.enabled = false;
  }
  if (task.flags.debug !== undefined || grunt.option ('build') === 'debug') {
    this.options.debugBuild.enabled = true;
    this.options.releaseBuild.enabled = false;
  }
  this.verbose = grunt.option ('verbose');
  // Clone the external modules and use it as a starting point.
  this.modules = extend ({}, this._setupExternalModules ());
  // Reset tracer.
  this.loaded = {};
  this.outputtedFiles = {};
  this.filesRefCount = {};
  // Reset the scripts list to a clone of the `require` option or to an empty list.
  this.standaloneScripts = (this.options.require || []).slice ();
  this.shared = {};
  this._events = {};
}
function Context ( grunt , task , defaultOptions ) { this . grunt = grunt ; this . options = extend ( { } , defaultOptions , task . options ( ) ) ; switch ( this . options . buildMode ) { case 'release' : this . options . debugBuild . enabled = false ; this . options . releaseBuild . enabled = true ; break ; case 'debug' : this . options . debugBuild . enabled = true ; this . options . releaseBuild . enabled = false ; } if ( task . flags . debug !== undefined || grunt . option ( 'build' ) === 'debug' ) { this . options . debugBuild . enabled = true ; this . options . releaseBuild . enabled = false ; } this . verbose = grunt . option ( 'verbose' ) ; // Clone the external modules and use it as a starting point. this . modules = extend ( { } , this . _setupExternalModules ( ) ) ; // Reset tracer. this . loaded = { } ; this . outputtedFiles = { } ; this . filesRefCount = { } ; // Reset the scripts list to a clone of the `require` option or to an empty list. this . standaloneScripts = ( this . options . require || [ ] ) . slice ( ) ; this . shared = { } ; this . _events = { } ; }
The execution context for the middleware stack.
Contains shared information available throughout the middleware stack.
@constructor
@param grunt The Grunt API.
@param task The currently executing Grunt task.
@param {TaskOptions} defaultOptions The default values for all of the Angular Builder's options, including all
middleware options.
The execution context for the middleware stack . Contains shared information available throughout the middleware stack .