text: 
  /**
   * Vue Router
   *
   * @library
   *
   * https://router.vuejs.org/en/
   */
  
  // Lib imports
  import Vue from 'vue'
  import VueAnalytics from 'vue-analytics'
  import Router from 'vue-router'
  import store from '../store'
  import Meta from 'vue-meta'
  
  // Routes
  import paths from './paths'
  
  Vue.use(Router)
  const originalPush = Router.prototype.push
  Router.prototype.push = function push (location) {
    return originalPush.call(this, location).catch(err => err)
  }
  
  // Create a new router
  const router = new Router({
    base: '/',
    // mode: 'history',
    routes: paths,
  
    scrollBehavior (to, from, savedPosition) {
      if (savedPosition) {
        return savedPosition
      }
      if (to.hash) {
        return { selector: to.hash }
      }
      return { x: 0, y: 0 }
    }
  })
  
  // Route guard checks to see if you are logged in, if not reroutes to login
  // to is where you are going, matched.some is to find which routes have requiresAuth
  router.beforeEach((to, from, next) => {
    if (to.matched.some(record => record.meta.requiresAuth)) {
      if (store.getters.authorized) {
        next()
        return
      }
      next('/')
    } else {
      next()
    }
  })
  
  Vue.use(Meta)
  
  // Bootstrap Analytics
  // Set in .env
  // https://github.com/MatteoGabriele/vue-analytics
  if (process.env.GOOGLE_ANALYTICS) {
    Vue.use(VueAnalytics, {
      id: process.env.GOOGLE_ANALYTICS,
      router,
      autoTracking: {
        page: process.env.NODE_ENV !== 'development'
      }
    })
  }
  
  export default router
  