Skip to content

Instantly share code, notes, and snippets.

@JamieCurnow
Last active October 16, 2018 02:30
Show Gist options
  • Save JamieCurnow/42e2c5511d6e184b1f702e47184f46c3 to your computer and use it in GitHub Desktop.
Save JamieCurnow/42e2c5511d6e184b1f702e47184f46c3 to your computer and use it in GitHub Desktop.
import Vue from 'nativescript-vue'
import routes from '~/router'
import store from '~/store'
import sideDrawer from '~/components/sideDrawer'
import drawerContent from '~/components/drawerContent'
// Prints Vue logs when --env.production is *NOT* set while building
Vue.config.silent = (TNS_ENV === 'production')
Vue.registerElement('RadSideDrawer', () => require('nativescript-ui-sidedrawer').RadSideDrawer)
// Set up routes as a prototype to use throuhout the app.
Vue.prototype.$routes = routes
new Vue({
store,
render (h) {
return h(
sideDrawer,
[
h(drawerContent, { slot: 'drawerContent' }),
h(routes.Home, { slot: 'mainContent' })
]
)
}
}).$start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment