lib/index.js
function writeLicensesFile(rootDir) {

    var licenses = checkLicenses(rootDir),
        licensesFileContent = "LICENSES " + "\n \n";

    _(licenses).each(function(licenseData, licenseName) {

        licensesFileContent += licenseName + " : ";

        if(licenseData.isMIT) {
            licensesFileContent += "MIT";
        }
        else {
            licensesFileContent += "Unknown License";
        }

        licensesFileContent += "\n \n";

        if(licenseData.content) {
            licensesFileContent += licenseData.content + "\n \n";
        }

    });

    fs.writeFileSync(rootDir + "/LICENSES", licensesFileContent, "utf-8");
}
function writeLicensesFile(rootDir) {

    var licenses = checkLicenses(rootDir),
        licensesFileContent = "LICENSES " + "\n \n";

    _(licenses).each(function(licenseData, licenseName) {

        licensesFileContent += licenseName + " : ";

        if(licenseData.isMIT) {
            licensesFileContent += "MIT";
        }
        else {
            licensesFileContent += "Unknown License";
        }

        licensesFileContent += "\n \n";

        if(licenseData.content) {
            licensesFileContent += licenseData.content + "\n \n";
        }

    });

    fs.writeFileSync(rootDir + "/LICENSES", licensesFileContent, "utf-8");
}
function writeLicensesFile ( rootDir ) { var licenses = checkLicenses ( rootDir ) , licensesFileContent = "LICENSES " + "\n \n" ; _ ( licenses ) . each ( function ( licenseData , licenseName ) { licensesFileContent += licenseName + " : " ; if ( licenseData . isMIT ) { licensesFileContent += "MIT" ; } else { licensesFileContent += "Unknown License" ; } licensesFileContent += "\n \n" ; if ( licenseData . content ) { licensesFileContent += licenseData . content + "\n \n" ; } } ) ; fs . writeFileSync ( rootDir + "/LICENSES" , licensesFileContent , "utf-8" ) ; }
writes all License-information in a single file
called LICENSES

@param rootDir the rootDir of your module
writes all License - information in a single file called LICENSES