build-system/tasks/make-golden.js
/**
   * Recursively scan a directory for png files collecting the
   * names of them. Add the resulting filenames to the
   * goldenFiles collection.
   * @param {string} dir path to directory
   */
Recursively scan a directory for png files collecting the
names of them. Add the resulting filenames to the
goldenFiles collection.
@param {string} dir path to directory
Recursively scan a directory for png files collecting the names of them . Add the resulting filenames to the goldenFiles collection . @param { string } dir path to directory
function scanDir(dir) {
    fs.readdirSync(dir).forEach(function(file) {
      var path = dir + '/' + file;
      if (endsWith(file, '.png')) {
        goldenFiles.push(path.replace('screenshots/', ''));
      } else if (fs.statSync(path).isDirectory()) {
        scanDir(path);
      }
    });
  }
function scanDir ( dir ) { fs . readdirSync ( dir ) . forEach ( function ( file ) { var path = dir + '/' + file ; if ( endsWith ( file , '.png' ) ) { goldenFiles . push ( path . replace ( 'screenshots/' , '' ) ) ; } else if ( fs . statSync ( path ) . isDirectory ( ) ) { scanDir ( path ) ; } } ) ; }
Recursively scan a directory for png files collecting the
 names of them.
Recursively scan a directory for png files collecting the names of them .