diff --git a/externs/closure-types.js b/externs/closure-types.js index 86cb4c3d6d..e9e8917859 100644 --- a/externs/closure-types.js +++ b/externs/closure-types.js @@ -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 * diff --git a/externs/polymer-externs.js b/externs/polymer-externs.js index 84651615d4..7841ecba83 100644 --- a/externs/polymer-externs.js +++ b/externs/polymer-externs.js @@ -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 */ diff --git a/externs/webcomponents-externs.js b/externs/webcomponents-externs.js index d06dc892ee..881e6d3785 100644 --- a/externs/webcomponents-externs.js +++ b/externs/webcomponents-externs.js @@ -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 */ diff --git a/gulpfile.js b/gulpfile.js index 744efaf108..6776cd1474 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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}); @@ -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}`); }); }); \ No newline at end of file