Skip to content

Instantly share code, notes, and snippets.

@Akryum
Last active September 17, 2018 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akryum/727d191b386402727437dafc54ba09b8 to your computer and use it in GitHub Desktop.
Save Akryum/727d191b386402727437dafc54ba09b8 to your computer and use it in GitHub Desktop.
NativeScript Vue devtools example
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