Revert "refactor: add license header to JS files & format files (#12035)"

This reverts commit 8310c91823.
This commit is contained in:
Chuck Jazdzewski
2016-10-04 14:06:41 -07:00
parent 8310c91823
commit 43d3a84df3
73 changed files with 947 additions and 1173 deletions

View File

@ -1,11 +1,4 @@
#! /usr/bin/env node
/**
* @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
*/
/**
* TODO: remove this file when license is included in RxJS bundles.
@ -24,19 +17,22 @@ ${license}
**/
`;
var bundles =
fs.readdirSync(args['build-path'])
// Match files that begin with Rx and end with js
.filter(bundle => /^Rx\.?.*\.js$/.test(bundle))
// Load file contents
.map(bundle => {
return {
path: bundle,
contents: fs.readFileSync(`${args['build-path']}/${bundle}`).toString()
};
})
// Concatenate license to bundle
.map(bundle => { return {path: bundle.path, contents: `${license}${bundle.contents}`}; })
// Write file to disk
.forEach(
bundle => fs.writeFileSync(`${args['build-path']}/${bundle.path}`, bundle.contents));
var bundles = fs.readdirSync(args['build-path'])
// Match files that begin with Rx and end with js
.filter(bundle => /^Rx\.?.*\.js$/.test(bundle))
// Load file contents
.map(bundle => {
return {
path: bundle,
contents: fs.readFileSync(`${args['build-path']}/${bundle}`).toString()
};
})
// Concatenate license to bundle
.map(bundle => {
return {
path: bundle.path,
contents: `${license}${bundle.contents}`
};
})
// Write file to disk
.forEach(bundle => fs.writeFileSync(`${args['build-path']}/${bundle.path}`, bundle.contents));