-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lib): simplify component import from lib
simplify component import from lib
- Loading branch information
yogakurniawan
committed
Jul 12, 2020
1 parent
c1a5459
commit 83bb59e
Showing
5 changed files
with
77 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
import utils, { defaultOptions } from './utils'; | ||
import VueTelInputVuetify from './vue-tel-input-vuetify.vue'; | ||
|
||
export function install(Vue, customOptions = {}) { | ||
if (install.installed) return; | ||
if (!customOptions || !customOptions.vuetify) { | ||
return; | ||
} | ||
const { vuetify: vuetifyFramework } = customOptions; | ||
install.installed = true; | ||
install.vuetify = vuetifyFramework; | ||
utils.options = { | ||
...defaultOptions, | ||
...customOptions, | ||
}; | ||
Vue.use(vuetifyFramework); | ||
Vue.component('vue-tel-input-vuetify', VueTelInputVuetify); | ||
} | ||
|
||
export { VueTelInputVuetify }; | ||
|
||
const plugin = { | ||
install, | ||
}; | ||
|
||
// Auto-install | ||
let GlobalVue = null; | ||
if (typeof window !== 'undefined') { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== 'undefined') { | ||
GlobalVue = global.Vue; | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} | ||
|
||
export default plugin; | ||
export default VueTelInputVuetify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import utils, { defaultOptions } from './utils'; | ||
import VueTelInputVuetify from './vue-tel-input-vuetify.vue'; | ||
|
||
export function install(Vue, customOptions = {}) { | ||
if (install.installed) return; | ||
if (!customOptions || !customOptions.vuetify) { | ||
return; | ||
} | ||
const { vuetify: vuetifyFramework } = customOptions; | ||
install.installed = true; | ||
install.vuetify = vuetifyFramework; | ||
utils.options = { | ||
...defaultOptions, | ||
...customOptions, | ||
}; | ||
Vue.use(vuetifyFramework); | ||
Vue.component('vue-tel-input-vuetify', VueTelInputVuetify); | ||
} | ||
|
||
export { VueTelInputVuetify }; | ||
|
||
const plugin = { | ||
install, | ||
}; | ||
|
||
// Auto-install | ||
let GlobalVue = null; | ||
if (typeof window !== 'undefined') { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== 'undefined') { | ||
GlobalVue = global.Vue; | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} | ||
|
||
export default plugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
import utils, { defaultOptions } from './utils'; | ||
import VueTelInputVuetify from './vue-tel-input-vuetify.vue'; | ||
|
||
export function install(Vue, customOptions = {}) { | ||
if (install.installed) return; | ||
if (!customOptions || !customOptions.vuetify) { | ||
return; | ||
} | ||
const { vuetify: vuetifyFramework } = customOptions; | ||
install.installed = true; | ||
install.vuetify = vuetifyFramework; | ||
utils.options = { | ||
...defaultOptions, | ||
...customOptions, | ||
}; | ||
Vue.use(vuetifyFramework); | ||
Vue.component('vue-tel-input-vuetify', VueTelInputVuetify); | ||
} | ||
|
||
export { VueTelInputVuetify }; | ||
|
||
const plugin = { | ||
install, | ||
}; | ||
|
||
// Auto-install | ||
let GlobalVue = null; | ||
if (typeof window !== 'undefined') { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== 'undefined') { | ||
GlobalVue = global.Vue; | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} | ||
|
||
export default plugin; | ||
export default VueTelInputVuetify; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import utils, { defaultOptions } from './utils'; | ||
import VueTelInputVuetify from './vue-tel-input-vuetify.vue'; | ||
|
||
export function install(Vue, customOptions = {}) { | ||
if (install.installed) return; | ||
if (!customOptions || !customOptions.vuetify) { | ||
return; | ||
} | ||
const { vuetify: vuetifyFramework } = customOptions; | ||
install.installed = true; | ||
install.vuetify = vuetifyFramework; | ||
utils.options = { | ||
...defaultOptions, | ||
...customOptions, | ||
}; | ||
Vue.use(vuetifyFramework); | ||
Vue.component('vue-tel-input-vuetify', VueTelInputVuetify); | ||
} | ||
|
||
export { VueTelInputVuetify }; | ||
|
||
const plugin = { | ||
install, | ||
}; | ||
|
||
// Auto-install | ||
let GlobalVue = null; | ||
if (typeof window !== 'undefined') { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== 'undefined') { | ||
GlobalVue = global.Vue; | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} | ||
|
||
export default plugin; |