mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
inital commit.
This commit is contained in:
14
src/Neko.vue
Normal file
14
src/Neko.vue
Normal file
@ -0,0 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Hello world, Neko.</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Vue, Component, Ref } from 'vue-property-decorator'
|
||||
|
||||
@Component({
|
||||
name: 'neko',
|
||||
})
|
||||
export default class extends Vue {}
|
||||
</script>
|
28
src/wrapper.js
Normal file
28
src/wrapper.js
Normal file
@ -0,0 +1,28 @@
|
||||
// Import vue component
|
||||
import Neko from './Neko.vue';
|
||||
|
||||
// Declare install function executed by Vue.use()
|
||||
export function install(Vue) {
|
||||
if (install.installed) return;
|
||||
install.installed = true;
|
||||
Vue.component('Neko', Neko);
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
// To allow use as module (npm/webpack/etc.) export Neko
|
||||
export default Neko;
|
Reference in New Issue
Block a user