-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17a027a
commit f02e022
Showing
5 changed files
with
24 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
|
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,28 +1,15 @@ | ||
// Import vue component | ||
import {Uiloader} from './loader.vue'; | ||
import loader from './loader.vue'; | ||
|
||
// Declare install function executed by Vue.use() | ||
export function install(Vue) { | ||
if (install.installed) return; | ||
install.installed = true; | ||
Vue.component('loader',Uiloader); | ||
const install = (Vue) => { | ||
Vue.component('loader', loader) | ||
} | ||
|
||
// Create module definition for Vue.use() | ||
const plugin = { | ||
install, | ||
}; | ||
|
||
// Auto-install when vue is found (eg. in browser via <script> tag) | ||
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 { | ||
install | ||
} | ||
|
||
// To allow use as module (npm/webpack/etc.) export component | ||
export default {Uiloader}; | ||
export {loader}; |
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,10 +1,8 @@ | ||
module.exports = { | ||
css: { | ||
extract: false | ||
}, | ||
configureWebpack: { | ||
output: { | ||
libraryExport: 'default' | ||
} | ||
} | ||
} | ||
publicPath: '/vue-ui-preloader/', | ||
configureWebpack: { | ||
output: { | ||
libraryExport: 'default' | ||
} | ||
} | ||
} |