Skip to content

Commit

Permalink
[ci skip] Add license headers to externs
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Aug 11, 2017
1 parent e47f7df commit f4a9e06
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
10 changes: 9 additions & 1 deletion externs/closure-types.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
* @fileoverview Closure types for Polymer mixins
*
Expand Down
8 changes: 8 additions & 0 deletions externs/polymer-externs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*
* @fileoverview Externs for Polymer
* @externs
*/
Expand Down
8 changes: 8 additions & 0 deletions externs/webcomponents-externs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*
* @fileoverview Externs for webcomponents polyfills
* @externs
*/
Expand Down
13 changes: 12 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ let CLOSURE_LINT_ONLY = false;

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

const licenseHeader =
`/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/`;

class AddClosureTypeImport extends Transform {
constructor(entryFileName, typeFileName) {
super({objectMode: true});
Expand Down Expand Up @@ -241,6 +252,6 @@ gulp.task('lint', function() {
gulp.task('generate-closure-externs', ['clean'], () => {
let genClosure = require('@polymer/gen-closure-declarations').generateDeclarations;
return genClosure().then((declarations) => {
fs.writeFileSync('externs/closure-types.js', declarations);
fs.writeFileSync('externs/closure-types.js', `${licenseHeader}${declarations}`);
});
});

0 comments on commit f4a9e06

Please sign in to comment.