2015-07-10 20:43:30 -04:00
|
|
|
var fs = require('fs');
|
|
|
|
module.exports = function(licenseFile, outputFile) {
|
|
|
|
var licenseText = fs.readFileSync(licenseFile);
|
2016-10-04 17:06:41 -04:00
|
|
|
var license = "/**\n @license\n" + licenseText + "\n */\n";
|
2015-07-10 20:43:30 -04:00
|
|
|
if (outputFile) {
|
|
|
|
outputFile = licenseFile + '.wrapped';
|
|
|
|
fs.writeFileSync(outputFile, license, 'utf8');
|
|
|
|
return outputFile;
|
|
|
|
} else {
|
|
|
|
return license;
|
|
|
|
}
|
|
|
|
};
|