function findNodeLicense()

in tasks/generate-license-data.js [221:244]


    function findNodeLicense(name, rootPath, errors, metadata) {
        var license = findNodeAttribute(name, rootPath, 'licenses');
        if (license != null) {
            return license;
        }
        license = findNodeAttribute(name, rootPath, 'license');
        if (license != null) {
            return license;
        }

        if (grunt.file.exists(rootPath + '/node_modules/' + name + '/MIT-LICENSE.txt')) {
            return 'The MIT License';
        }
        var licenseFiles = [
                rootPath + '/node_modules/' + name + '/LICENSE',
                rootPath + '/node_modules/' + name + '/LICENCE',  // some people misspell this
                rootPath + '/node_modules/' + name + '/LICENSE.txt',
                rootPath + '/node_modules/' + name + '/LICENSE.TXT',
                rootPath + '/node_modules/' + name + '/LICENSE.md',
                rootPath + '/node_modules/' + name + '/README.md',
                rootPath + '/node_modules/' + name + '/Readme.md'
        ];
        return LicenseFinder.discoverLicense(name, licenseFiles, errors, metadata);
    }