Last active
September 17, 2018 10:56
-
-
Save Akryum/727d191b386402727437dafc54ba09b8 to your computer and use it in GitHub Desktop.
NativeScript Vue devtools example
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
import Vue from 'nativescript-vue' | |
import router from './router' | |
import store from './store' | |
import devtools from '@vue/devtools' | |
// Prints Vue logs when --env.production is *NOT* set while building | |
Vue.config.silent = (TNS_ENV === 'production') | |
const app = new Vue({ | |
router, | |
store, | |
template: `<Frame><router-view/></Frame>`, | |
}) | |
devtools.connect('http://192.168.1.14', 8098, { | |
app, | |
highlight: () => {}, | |
showToast: (message) => require('nativescript-toast').makeText(message).show(), | |
io: (uri) => { | |
const SocketIO = require('nativescript-socket.io') | |
SocketIO.enableDebug() | |
return SocketIO.connect(uri) | |
} | |
}) | |
devtools.init(Vue) | |
app.$start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment