Skip to content

Commit

Permalink
fix(lib): export plugin instead of component
Browse files Browse the repository at this point in the history
export plugin instead of component
  • Loading branch information
yogakurniawan committed Jul 13, 2020
1 parent 6423e55 commit a106fff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ Install the plugin into Vue:

With vuetify loader:

```javascript
// vue.config.js

"transpileDependencies": [
"vuetify",
"vue-tel-input-vuetify"
]
```

```javascript
// src/plugins/vuetify.js

Expand All @@ -65,28 +74,16 @@ With vuetify loader:

```

```javascript
// src/VueComponent.js

import VueTelInputVuetify from "vue-tel-input-vuetify/lib"

<template>
<vue-tel-input-vuetify></vue-tel-input-vuetify>
</template>

export default {
components: {
VueTelInputVuetify,
},
};

```

```javascript
// src/main.js

import Vue from 'vue';
import vuetify from "@/plugins/vuetify";
import VueTelInputVuetify from 'vue-tel-input-vuetify/lib';

Vue.use(VueTelInputVuetify, {
vuetify,
});

new Vue({
vuetify,
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import VueTelInputVuetify from './vue-tel-input-vuetify.vue';
import plugin from './plugin';

export default VueTelInputVuetify;
export default plugin;
4 changes: 2 additions & 2 deletions src/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import VueTelInputVuetify from './vue-tel-input-vuetify.vue';
import plugin from './plugin';

export default VueTelInputVuetify;
export default plugin;

0 comments on commit a106fff

Please sign in to comment.