2016-10-04 23:39:20 -04:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
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 23:39:20 -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;
|
|
|
|
}
|
|
|
|
};
|