Skip to content

Commit f4a9e06

Browse files
committed
[ci skip] Add license headers to externs
1 parent e47f7df commit f4a9e06

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

externs/closure-types.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
1+
/**
2+
* @license
3+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
* Code distributed by Google as part of the polymer project is also
8+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
*/
210
/**
311
* @fileoverview Closure types for Polymer mixins
412
*

externs/polymer-externs.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
/**
2+
* @license
3+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
* Code distributed by Google as part of the polymer project is also
8+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
*
210
* @fileoverview Externs for Polymer
311
* @externs
412
*/

externs/webcomponents-externs.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
/**
2+
* @license
3+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
4+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7+
* Code distributed by Google as part of the polymer project is also
8+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9+
*
210
* @fileoverview Externs for webcomponents polyfills
311
* @externs
412
*/

gulpfile.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ let CLOSURE_LINT_ONLY = false;
6868

6969
let firstImportFinder = dom5.predicates.AND(dom5.predicates.hasTagName('link'), dom5.predicates.hasAttrValue('rel', 'import'));
7070

71+
const licenseHeader =
72+
`/**
73+
* @license
74+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
75+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
76+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
77+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
78+
* Code distributed by Google as part of the polymer project is also
79+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
80+
*/`;
81+
7182
class AddClosureTypeImport extends Transform {
7283
constructor(entryFileName, typeFileName) {
7384
super({objectMode: true});
@@ -241,6 +252,6 @@ gulp.task('lint', function() {
241252
gulp.task('generate-closure-externs', ['clean'], () => {
242253
let genClosure = require('@polymer/gen-closure-declarations').generateDeclarations;
243254
return genClosure().then((declarations) => {
244-
fs.writeFileSync('externs/closure-types.js', declarations);
255+
fs.writeFileSync('externs/closure-types.js', `${licenseHeader}${declarations}`);
245256
});
246257
});

0 commit comments

Comments
 (0)