tasks/catena.js
function recurseSrcDirectories (grunt, fileData, options) {
    let promises = [];

    // Ignore everything except directories and Javascript files.
    // Store function in array for recursive-readdir module.
    let ignoreCallback = [(file, stats) => !(stats.isDirectory() || path.extname(file) === '.js')];

    for (let i = 0, max = fileData.src.length; i < max; i++) {
        promises.push(readDir(fileData.src[i], ignoreCallback).then((value) => value, (err) => err));
    }

    Promise.all(promises)
        .then((values) => {
            streamMatches(grunt, fileData, options, values, values.flat());
        }, throwAsyncError);
}
function recurseSrcDirectories (grunt, fileData, options) {
    let promises = [];

    // Ignore everything except directories and Javascript files.
    // Store function in array for recursive-readdir module.
    let ignoreCallback = [(file, stats) => !(stats.isDirectory() || path.extname(file) === '.js')];

    for (let i = 0, max = fileData.src.length; i < max; i++) {
        promises.push(readDir(fileData.src[i], ignoreCallback).then((value) => value, (err) => err));
    }

    Promise.all(promises)
        .then((values) => {
            streamMatches(grunt, fileData, options, values, values.flat());
        }, throwAsyncError);
}
function recurseSrcDirectories ( grunt , fileData , options ) { let promises = [ ] ; // Ignore everything except directories and Javascript files. // Store function in array for recursive-readdir module. let ignoreCallback = [ ( file , stats ) => ! ( stats . isDirectory ( ) || path . extname ( file ) === '.js' ) ] ; for ( let i = 0 , max = fileData . src . length ; i < max ; i ++ ) { promises . push ( readDir ( fileData . src [ i ] , ignoreCallback ) . then ( ( value ) => value , ( err ) => err ) ) ; } Promise . all ( promises ) . then ( ( values ) => { streamMatches ( grunt , fileData , options , values , values . flat ( ) ) ; } , throwAsyncError ) ; }
Find all Javascript files in src directories.

@function recurseSrcDirectories
@param {Object} grunt
@param {Object} fileData
@param {Object} options
@api private
Find all Javascript files in src directories .