2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-20 00:00:32 +03:00

feat: use named exports to export helper functions

This commit is contained in:
pimlie
2019-03-05 14:06:21 +01:00
parent 9c80dab7b2
commit 95c3b7d4e8
4 changed files with 16 additions and 13 deletions
+6 -5
View File
@@ -9,7 +9,7 @@ export { hasMetaInfo } from './shared/hasMetaInfo'
* Plugin install function.
* @param {Function} Vue - the Vue constructor.
*/
function VueMeta(Vue, options = {}) {
function install(Vue, options = {}) {
options = setOptions(options)
Vue.prototype.$meta = $meta(options)
@@ -17,12 +17,13 @@ function VueMeta(Vue, options = {}) {
Vue.mixin(createMixin(Vue, options))
}
VueMeta.version = version
// automatic install
if (!isUndefined(window) && !isUndefined(window.Vue)) {
/* istanbul ignore next */
Vue.use(VueMeta)
install(window.Vue)
}
export default VueMeta
export {
version,
install
}