bin/pretty.js
function splitFilesIntoBatches(files, config) {
    // We need to specifiy a different parser for TS files
    const configTS = Object.assign({}, config);
    configTS.parser = 'typescript';

    const batches = [];

    batches.push({
        files: files.filter(fileName => fileMatchesExtension(fileName, EXTENSIONS.js)),
        config: config,
    });

    batches.push({
        files: files.filter(fileName => fileMatchesExtension(fileName, EXTENSIONS.ts)),
        config: configTS,
    });

    return batches;
}
function splitFilesIntoBatches(files, config) {
    // We need to specifiy a different parser for TS files
    const configTS = Object.assign({}, config);
    configTS.parser = 'typescript';

    const batches = [];

    batches.push({
        files: files.filter(fileName => fileMatchesExtension(fileName, EXTENSIONS.js)),
        config: config,
    });

    batches.push({
        files: files.filter(fileName => fileMatchesExtension(fileName, EXTENSIONS.ts)),
        config: configTS,
    });

    return batches;
}
function splitFilesIntoBatches ( files , config ) { // We need to specifiy a different parser for TS files const configTS = Object . assign ( { } , config ) ; configTS . parser = 'typescript' ; const batches = [ ] ; batches . push ( { files : files . filter ( fileName => fileMatchesExtension ( fileName , EXTENSIONS . js ) ) , config : config , } ) ; batches . push ( { files : files . filter ( fileName => fileMatchesExtension ( fileName , EXTENSIONS . ts ) ) , config : configTS , } ) ; return batches ; }
Takes a list of files and initial config, and splits into two batches, each consisting of a subset of files and
the specific config for that batch.
Takes a list of files and initial config and splits into two batches each consisting of a subset of files and the specific config for that batch .