mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
client refactor progress
This commit is contained in:
parent
46928ec7de
commit
e542627805
19 changed files with 1110 additions and 424 deletions
17
client/src/plugins/neko.ts
Normal file
17
client/src/plugins/neko.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { PluginObject } from 'vue'
|
||||
import { NekoClient } from '~/client'
|
||||
|
||||
const plugin: PluginObject<undefined> = {
|
||||
install(Vue) {
|
||||
console.log()
|
||||
const client = new NekoClient()
|
||||
.on('error', error => console.error('[%cNEKO%c] %cERR', 'color: #498ad8;', '', 'color: #d84949;', error))
|
||||
.on('warn', (...log) => console.warn('[%cNEKO%c] %cWRN', 'color: #498ad8;', '', 'color: #eae364;', ...log))
|
||||
.on('info', (...log) => console.info('[%cNEKO%c] %cINF', 'color: #498ad8;', '', 'color: #4ac94c;', ...log))
|
||||
.on('debug', (...log) => console.log('[%cNEKO%c] %cDBG', 'color: #498ad8;', '', 'color: #eae364;', ...log))
|
||||
|
||||
Vue.prototype.$client = client
|
||||
},
|
||||
}
|
||||
|
||||
export default plugin
|
Loading…
Add table
Add a link
Reference in a new issue