Skip to content

Instantly share code, notes, and snippets.

@mikejakobsen
Created August 25, 2017 07:46
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 mikejakobsen/c5767085f85b7b76b2aae19fcd5b1e82 to your computer and use it in GitHub Desktop.
Save mikejakobsen/c5767085f85b7b76b2aae19fcd5b1e82 to your computer and use it in GitHub Desktop.
  1. Replace "vue": "^1.0.24" with "vue": "^2.0.0", then run: npm install Line 40: package.json Reason: If you are using pre-2.0 Vue through NPM, you have to update it in your package.json file More info: http://vuejs.org/guide/migration.html#

  2. Replace "vue-loader": "^8.5.0" with "vue-loader": "^9.0.0", then run: npm install Line 41: package.json Reason: vue-loader 9.0 is the earliest supported version compatible with Vue 2.0 More info: http://vuejs.org/guide/migration.html#

  3. Replace "vue-router": "^0.7.13" with "vue-router": "^2.0.0", then run: npm install Line 43: package.json Reason: If you are using pre-2.0 Vue Router through NPM, you have to update it in your package.json file More info: http://vuejs.org/guide/migration-vue-router.html#

  4. Replace "vuex": "^0.6.3" with "vuex": "^1.0.0", then run: npm install Line 44: package.json Reason: Vuex 1.0 is the earliest supported version compatible with Vue 2.0 More info: http://vuejs.org/guide/migration-vuex.html#

  5. Replace transition="fade" attribute with either a or wrapper component Line 4: src/components/App.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  6. Replace ready with mounted, then use Vue.nextTick if you need an in-document guarantee Line 84: src/components/App.vue Reason: ready lifecycle hook has been removed More info: http://vuejs.org/guide/migration.html#ready

  7. Replace init with beforeCreate Line 109: src/components/App.vue Reason: init lifecycle hook has been removed More info: http://vuejs.org/guide/migration.html#init

  8. Replace this.$broadcast('window-resize', event) to use a global event bus or vuex (see link below for implementation details) Line 145: src/components/App.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  9. Replace this.$broadcast('window-visibility', event) to use a global event bus or vuex (see link below for implementation details) Line 150: src/components/App.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  10. Replace this.$broadcast('route-change', this.$route) to use a global event bus or vuex (see link below for implementation details) Line 161: src/components/App.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  11. Replace route.secondary with route.meta.secondary, then also update the route option to be scoped under meta Line 162: src/components/App.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  12. Refactor keep-alive attribute to a wrapper component Line 4: src/components/Case.vue Reason: keep-alive is now a wrapper element, rather than an attribute More info: http://vuejs.org/guide/migration.html#keep-alive-Attribute

  13. Replace canDeactivate with beforeRouteLeave in the component Line 31: src/components/Case.vue Reason: The canDeactivate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#canDeactivate

  14. Replace activate with beforeRouteEnter in the component Line 113: src/components/cases/bryrupfodboldskole/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  15. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 116: src/components/cases/bryrupfodboldskole/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  16. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 120: src/components/cases/bryrupfodboldskole/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  17. Replace activate with beforeRouteEnter in the component Line 98: src/components/cases/dribbble/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  18. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 101: src/components/cases/dribbble/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  19. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 105: src/components/cases/dribbble/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  20. Replace activate with beforeRouteEnter in the component Line 98: src/components/cases/podify/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  21. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 101: src/components/cases/podify/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  22. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 105: src/components/cases/podify/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  23. Replace activate with beforeRouteEnter in the component Line 67: src/components/cases/portfolio/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  24. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 70: src/components/cases/portfolio/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  25. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 74: src/components/cases/portfolio/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  26. Replace activate with beforeRouteEnter in the component Line 75: src/components/cases/praktiktak/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  27. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 78: src/components/cases/praktiktak/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  28. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 82: src/components/cases/praktiktak/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  29. Replace activate with beforeRouteEnter in the component Line 74: src/components/CV/index.vue Reason: The activate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#activate

  30. Replace this.$dispatch('content-loaded') to use a global event bus or vuex (see link below for implementation details) Line 76: src/components/CV/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  31. Replace canDeactivate with beforeRouteLeave in the component Line 80: src/components/CV/index.vue Reason: The canDeactivate router lifecycle hook has been removed More info: http://vuejs.org/guide/migration-vue-router.html#canDeactivate

  32. Replace this.$dispatch('content-destroy') to use a global event bus or vuex (see link below for implementation details) Line 84: src/components/CV/index.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  33. Update v-el:home to ref="home" Line 5: src/components/Primary.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  34. Update v-el:cases to ref="cases" Line 6: src/components/Primary.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  35. Update v-el:about to ref="about" Line 7: src/components/Primary.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  36. Update v-el:github to ref="github" Line 8: src/components/Primary.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  37. Update v-el:contact to ref="contact" Line 9: src/components/Primary.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  38. Replace transition="top" attribute with either a or wrapper component Line 3: src/components/secondary/Desktop.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  39. Replace v-link="{ path: '/', exact: true }" with the new component (see link below for details) Line 43: src/components/secondary/Main.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  40. Replace v-link="{ name: 'cases' }" with the new component (see link below for details) Line 44: src/components/secondary/Main.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  41. Replace v-link="{ name: 'about' }" with the new component (see link below for details) Line 45: src/components/secondary/Main.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  42. Replace v-link="{ name: 'github' }" with the new component (see link below for details) Line 46: src/components/secondary/Main.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  43. Replace v-link="{ name: 'contact' }" with the new component (see link below for details) Line 47: src/components/secondary/Main.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  44. Replace route.index with route.meta.index, then also update the route option to be scoped under meta Line 51: src/components/secondary/Main.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  45. Replace transition="fade" attribute with either a or wrapper component Line 54: src/components/secondary/Main.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  46. Replace transition="fade" attribute with either a or wrapper component Line 58: src/components/secondary/Main.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  47. Replace ready with mounted, then use Vue.nextTick if you need an in-document guarantee Line 117: src/components/secondary/Main.vue Reason: ready lifecycle hook has been removed More info: http://vuejs.org/guide/migration.html#ready

  48. Replace this.$broadcast('secondary-opened') to use a global event bus or vuex (see link below for implementation details) Line 135: src/components/secondary/Main.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  49. Replace this.$broadcast('secondary-closed') to use a global event bus or vuex (see link below for implementation details) Line 138: src/components/secondary/Main.vue Reason: $dispatch and $broadcast have been removed because the pattern doesn't scale well More info: http://vuejs.org/guide/migration.html#dispatch-and-broadcast

  50. Replace router.go with router.push Line 158: src/components/secondary/Main.vue Reason: For consistency with the HTML5 History API, router.go is now only used for back/forward navigation, while router.push is used to navigate to a specific page More info: http://vuejs.org/guide/migration-vue-router.html#router-go

  51. Update this.$els.content to this.$refs.content Line 279: src/components/secondary/Main.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  52. Replace transition="section" attribute with either a or wrapper component Line 3: src/components/secondary/Mobile.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  53. Replace transition="nav" attribute with either a or wrapper component Line 6: src/components/secondary/Mobile.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  54. Replace transition="links" attribute with either a or wrapper component Line 9: src/components/secondary/Mobile.vue Reason: The new and improved transition system requires use of new and components More info: http://vuejs.org/guide/migration.html#transition-Attribute

  55. Update v-el:about to ref="about" Line 2: src/components/stages/about.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  56. Replace v-link="{name: 'cv'}" with the new component (see link below for details) Line 12: src/components/stages/about.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  57. Update v-el:cases to ref="cases" Line 2: src/components/stages/cases.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  58. Replace v-link="{name: 'case', params: {case: case.id}}" with the new component (see link below for details) Line 7: src/components/stages/cases.vue Reason: The v-link directive has been replaced with the new component More info: http://vuejs.org/guide/migration-vue-router.html#v-link

  59. Update v-el:container to ref="container" Line 3: src/components/World.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  60. Replace ready with mounted, then use Vue.nextTick if you need an in-document guarantee Line 66: src/components/World.vue Reason: ready lifecycle hook has been removed More info: http://vuejs.org/guide/migration.html#ready

  61. Update this.$els.container to this.$refs.container Line 74: src/components/World.vue Reason: v-el and v-ref merged into ref attribute More info: http://vuejs.org/guide/migration.html#v-el-and-v-ref

  62. Replace route.index with route.meta.index, then also update the route option to be scoped under meta Line 80: src/components/World.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  63. Replace route.index with route.meta.index, then also update the route option to be scoped under meta Line 114: src/components/World.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  64. Replace route.index with route.meta.index, then also update the route option to be scoped under meta Line 123: src/components/World.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  65. Replace router.go with router.push Line 124: src/components/World.vue Reason: For consistency with the HTML5 History API, router.go is now only used for back/forward navigation, while router.push is used to navigate to a specific page More info: http://vuejs.org/guide/migration-vue-router.html#router-go

  66. Replace route.index with route.meta.index, then also update the route option to be scoped under meta Line 133: src/components/World.vue Reason: Arbitrary route properties must now be scoped under the new meta property, to avoid conflicts with future features More info: http://vuejs.org/guide/migration-vue-router.html#Arbitrary-Route-Properties

  67. Replace router.go with router.push Line 134: src/components/World.vue Reason: For consistency with the HTML5 History API, router.go is now only used for back/forward navigation, while router.push is used to navigate to a specific page More info: http://vuejs.org/guide/migration-vue-router.html#router-go

  68. Remove the hashbang option Line 15: src/main.js Reason: Hashbangs are no longer required for Google to crawl a URL, so they are no longer the default (or even an option) for the hash strategy More info: http://vuejs.org/guide/migration-vue-router.html#hashbang-false

  69. Replace history: true with mode: 'history' Line 16: src/main.js Reason: All router modes (e.g. history, hash, abstract) are now set through the new mode option More info: http://vuejs.org/guide/migration-vue-router.html#history-true

  70. Replace router.map with an array on the new routes option (see link below for details) Line 22: src/main.js Reason: Routes are now defined as an array on a routes option at router instantiation More info: http://vuejs.org/guide/migration-vue-router.html#router-map

  71. Replace router.redirect with a redirect option in a route definition (see link below for details) Line 62: src/main.js Reason: Redirects have been moved to an option on route definitions to improve config organization More info: http://vuejs.org/guide/migration-vue-router.html#router-redirect

  72. Replace router.start with router: router on your root Vue instance (see link below for details) Line 66: src/main.js Reason: Starting an app with routing no longer requires a special method - the router can simply be passed to the root Vue instance as option More info: http://vuejs.org/guide/migration-vue-router.html#router-start

  73. Replace .fade-transition with .fade-enter-active, .fade-leave-active Line 147: src/stylesheets/_globals.scss Reason: v-transition class has been replaced by the standard classes used by Angular and React CSSTransitionGroup More info: http://vuejs.org/guide/migration.html#transition-Attribute

  74. Replace .fade-leave with .fade-leave-active (if it's left over from Vue 1.x) Line 150: src/stylesheets/_globals.scss Reason: v-leave class now defines a starting state for leave transitions, rather than the ending state More info: http://vuejs.org/guide/migration.html#Transitions

  75. Replace .section-transition with .section-enter-active, .section-leave-active Line 206: src/stylesheets/_menu.scss Reason: v-transition class has been replaced by the standard classes used by Angular and React CSSTransitionGroup More info: http://vuejs.org/guide/migration.html#transition-Attribute

  76. Replace .section-leave with .section-leave-active (if it's left over from Vue 1.x) Line 210: src/stylesheets/_menu.scss Reason: v-leave class now defines a starting state for leave transitions, rather than the ending state More info: http://vuejs.org/guide/migration.html#Transitions

  77. Replace .nav-transition with .nav-enter-active, .nav-leave-active Line 214: src/stylesheets/_menu.scss Reason: v-transition class has been replaced by the standard classes used by Angular and React CSSTransitionGroup More info: http://vuejs.org/guide/migration.html#transition-Attribute

  78. Replace .nav-leave with .nav-leave-active (if it's left over from Vue 1.x) Line 218: src/stylesheets/_menu.scss Reason: v-leave class now defines a starting state for leave transitions, rather than the ending state More info: http://vuejs.org/guide/migration.html#Transitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment