Skip to content

Commit

Permalink
Export the current Polymer version in polymer-element.js
Browse files Browse the repository at this point in the history
  • Loading branch information
TimvdLippe committed Aug 9, 2018
1 parent 59405b5 commit 05c62f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('.'));
});
5 changes: 5 additions & 0 deletions polymer-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit 05c62f4

Please sign in to comment.