-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: expose version on existing plugins and components #31
Conversation
Updates create script template to include the version of the generated component or plugin.
Expose the component version by adding a `VERSION` property to the constructor, to retrieve the version of the component on a given player simply do: ```javascript // Retrieve the player const player = document.getElementsByTagName('video')[0].parentElement.player; // Print the component version console.log(player.SkipButton.constructor.VERSION); ```
Coverage Report
File Coverage
|
|
Expose the plugin version by adding a static getter `VERSION` to all plugins and components. To retrieve the version of the component on a given player simply do: ```javascript // Retrieve the player const player = document.getElementsByTagName('video')[0].parentElement.player; // Print the component version console.log(player.pillarboxPlaylist().version()); ```
475d934
to
1e07832
Compare
|
||
static get VERSION() { | ||
return version; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🎉 This PR is included in version @srgssr/pillarbox-playlist-v2.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @srgssr/skip-button-v1.0.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Exposes the version in the package.json of each existing plugin and component. Modified the create script template so that the
VERSION
is automatically added on every new package.Retrieve the version of a component:
Retrieve the version of a plugin:
Changes Made
VERSION
property to the constructor.VERSION
property to the constructor.Checklist