Skip to content

Commit e0dd2b7

Browse files
authored
add global variable build (#8)
1 parent 0bea393 commit e0dd2b7

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
A simple and lightweight Vue modal component for __Vue 2.x__.
66

7+
8+
## Documentation
9+
710
Docs: https://initbase.github.io/vue-modal-2/
811

12+
913
## Demo
1014
[demo codesandbox](https://codesandbox.io/s/vue-modal-2-vue2-forked-rfxwr)
1115

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@burhanahmeed/vue-modal-2",
3-
"version": "1.1.9",
3+
"version": "1.1.10",
44
"private": false,
55
"author": "Burhanuddin Ahmed <brhn@kusiaga.com>",
66
"license": "MIT",

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,14 @@ const plugin = {
2828
}
2929
};
3030

31+
let GlobalVue = null;
32+
if (typeof window !== 'undefined') {
33+
GlobalVue = window.Vue;
34+
} else if (typeof global !== 'undefined') {
35+
GlobalVue = global.Vue;
36+
}
37+
if (GlobalVue) {
38+
GlobalVue.use(plugin);
39+
}
40+
3141
export default plugin;

0 commit comments

Comments
 (0)