From 05c62f4442a58676689890fdd4d3d66282db9a6e Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Thu, 9 Aug 2018 15:10:35 +0200 Subject: [PATCH] Export the current Polymer version in polymer-element.js --- gulpfile.js | 6 +++--- polymer-element.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8b584672f2..431ad920c8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -277,7 +277,7 @@ gulp.task('lint', gulp.series('lint-eslint')); gulp.task('generate-types', gulp.series('generate-typescript')); gulp.task('update-version', () => { - return gulp.src('lib/utils/boot.js') - .pipe(replace(/(window.Polymer.version = )'\d+\.\d+\.\d+'/, `$1'${require('./package.json').version}'`)) - .pipe(gulp.dest('lib/utils')); + return gulp.src('polymer-element.js') + .pipe(replace(/(export const version = )'\d+\.\d+\.\d+'/, `$1'${require('./package.json').version}'`)) + .pipe(gulp.dest('.')); }); diff --git a/polymer-element.js b/polymer-element.js index 7188e01b73..8cb6e5ccd2 100644 --- a/polymer-element.js +++ b/polymer-element.js @@ -28,3 +28,8 @@ export { html } from './lib/utils/html-tag.js'; */ export const PolymerElement = ElementMixin(HTMLElement); +/** + * Current Polymer version in Semver notation. + * @type {String} Semver notation of the current version of Polymer. + */ +export const version = '3.0.5';