function exportAppRoots()

in tasks/generate-license-data.js [32:48]


    function exportAppRoots(appRoots, fileName, metadata) {
        var licenses = [];
        var errors = [];
        appRoots.forEach(function (appRoot) {
            accumulateNodeLicenses(licenses, errors, appRoot, metadata);
        });
        var sortedResult = licenses.sort(function (a, b) {
            return a.name.localeCompare(b.name);
        });

        if (errors.length === 0) {
            exportToCsv(sortedResult, fileName);
        } else {
            grunt.log.error('Error generating license data.');
            grunt.log.error(errors.join('\n'));
        }
    }