Skip to content

Commit

Permalink
add global variable build (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanahmeed authored Apr 16, 2021
1 parent 0bea393 commit e0dd2b7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

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


## Documentation

Docs: https://initbase.github.io/vue-modal-2/


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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@burhanahmeed/vue-modal-2",
"version": "1.1.9",
"version": "1.1.10",
"private": false,
"author": "Burhanuddin Ahmed <[email protected]>",
"license": "MIT",
Expand Down
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,14 @@ const plugin = {
}
};

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;

0 comments on commit e0dd2b7

Please sign in to comment.