tasks/uglifyAMD.js
function buildPaths(file, arr) {
    if (!grunt.file.exists(file)) {
      grunt.log.warn('File "' + file + '" not found');
      return null;
    }
    arr.unshift(file);
    var namespaces = pathTable[file];
    if (namespaces && namespaces.length) {
      for (var i = namespaces.length, ns; i-- > 0;) {
        ns = namespaces[i];
        if (!nsTable[ns]) {
          throw new Error(
            'Required namespace "' + ns + '" not found in ' + file);
        }
        buildPaths(nsTable[ns], arr);
      }
    }
    return arr;
  }
function buildPaths(file, arr) {
    if (!grunt.file.exists(file)) {
      grunt.log.warn('File "' + file + '" not found');
      return null;
    }
    arr.unshift(file);
    var namespaces = pathTable[file];
    if (namespaces && namespaces.length) {
      for (var i = namespaces.length, ns; i-- > 0;) {
        ns = namespaces[i];
        if (!nsTable[ns]) {
          throw new Error(
            'Required namespace "' + ns + '" not found in ' + file);
        }
        buildPaths(nsTable[ns], arr);
      }
    }
    return arr;
  }
function buildPaths ( file , arr ) { if ( ! grunt . file . exists ( file ) ) { grunt . log . warn ( 'File "' + file + '" not found' ) ; return null ; } arr . unshift ( file ) ; var namespaces = pathTable [ file ] ; if ( namespaces && namespaces . length ) { for ( var i = namespaces . length , ns ; i -- > 0 ; ) { ns = namespaces [ i ] ; if ( ! nsTable [ ns ] ) { throw new Error ( 'Required namespace "' + ns + '" not found in ' + file ) ; } buildPaths ( nsTable [ ns ] , arr ) ; } } return arr ; }
Recursively builds file paths array from specified file and assigns them to
array parameter. Uses pathTable to look up namespace dependencies.
@param {string} file File path.
@param {Array} arr Array to store file paths.
@returns {Array|null} Array of file paths.
Recursively builds file paths array from specified file and assigns them to array parameter . Uses pathTable to look up namespace dependencies .