lib/reduce.js
function reduceBundles(bundles, dependencies, maxBundles) {
    while (anyMainExceedsMaxBundles(bundles, maxBundles)) {
        var merge = findLeastCostMerge(bundles, dependencies, maxBundles);
        mergeBundles(merge.bundle1Name, merge.bundle2Name, bundles);
    }
    return bundles;
}
function reduceBundles(bundles, dependencies, maxBundles) {
    while (anyMainExceedsMaxBundles(bundles, maxBundles)) {
        var merge = findLeastCostMerge(bundles, dependencies, maxBundles);
        mergeBundles(merge.bundle1Name, merge.bundle2Name, bundles);
    }
    return bundles;
}
function reduceBundles ( bundles , dependencies , maxBundles ) { while ( anyMainExceedsMaxBundles ( bundles , maxBundles ) ) { var merge = findLeastCostMerge ( bundles , dependencies , maxBundles ) ; mergeBundles ( merge . bundle1Name , merge . bundle2Name , bundles ) ; } return bundles ; }
Given a set of bundles, merge until no main module needs to fetch from more
than maxBundles number of bundles.
Given a set of bundles merge until no main module needs to fetch from more than maxBundles number of bundles .