From 407569480b7ef5fa016a919f4185a0a851bf0b43 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Mon, 23 Oct 2017 17:27:30 +0800 Subject: [PATCH 1/3] refactor: use nuxt-class-component in example --- examples/vue-class-component/nuxt.config.js | 3 --- examples/vue-class-component/package.json | 3 ++- .../plugins/nuxt-class-component.js | 14 -------------- 3 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 examples/vue-class-component/plugins/nuxt-class-component.js diff --git a/examples/vue-class-component/nuxt.config.js b/examples/vue-class-component/nuxt.config.js index 4e7a3097a9..4d32a9ca0a 100644 --- a/examples/vue-class-component/nuxt.config.js +++ b/examples/vue-class-component/nuxt.config.js @@ -2,9 +2,6 @@ module.exports = { build: { babel: { plugins: ['transform-decorators-legacy', 'transform-class-properties'] - }, - extend (config) { - config.resolve.alias['nuxt-class-component'] = '@/plugins/nuxt-class-component' } } } diff --git a/examples/vue-class-component/package.json b/examples/vue-class-component/package.json index e672615065..89e9d65c2a 100644 --- a/examples/vue-class-component/package.json +++ b/examples/vue-class-component/package.json @@ -4,7 +4,8 @@ "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "nuxt": "latest", - "vue-class-component": "^5.0.1" + "nuxt-class-component": "^1.0.3", + "vue": "~2.4.2" }, "scripts": { "dev": "nuxt", diff --git a/examples/vue-class-component/plugins/nuxt-class-component.js b/examples/vue-class-component/plugins/nuxt-class-component.js deleted file mode 100644 index 2f5188d00b..0000000000 --- a/examples/vue-class-component/plugins/nuxt-class-component.js +++ /dev/null @@ -1,14 +0,0 @@ -import Component from 'vue-class-component' - -Component.registerHooks([ - 'beforeRouteEnter', - 'beforeRouteLeave', - 'asyncData', - 'fetch', - 'middleware', - 'layout', - 'transition', - 'scrollToTop' -]) - -export default Component From 1cb1238d8a83dfbe24e156862e80594a75cf824a Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 25 Oct 2017 10:07:29 +0800 Subject: [PATCH 2/3] refactor: remove vue dependency after nuxt-class-component upgrade --- examples/vue-class-component/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/vue-class-component/package.json b/examples/vue-class-component/package.json index 89e9d65c2a..f4953a0a84 100644 --- a/examples/vue-class-component/package.json +++ b/examples/vue-class-component/package.json @@ -4,8 +4,7 @@ "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "nuxt": "latest", - "nuxt-class-component": "^1.0.3", - "vue": "~2.4.2" + "nuxt-class-component": "^1.0.3" }, "scripts": { "dev": "nuxt", From 08e770c1e00c30d1115a2698b0a20d243d09710a Mon Sep 17 00:00:00 2001 From: Clark Du Date: Fri, 27 Oct 2017 22:15:34 +0800 Subject: [PATCH 3/3] refactor: upgrade nuxt-class-component to a stabe version --- examples/vue-class-component/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vue-class-component/package.json b/examples/vue-class-component/package.json index f4953a0a84..797a48f36e 100644 --- a/examples/vue-class-component/package.json +++ b/examples/vue-class-component/package.json @@ -4,7 +4,7 @@ "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "nuxt": "latest", - "nuxt-class-component": "^1.0.3" + "nuxt-class-component": "^1.0.4" }, "scripts": { "dev": "nuxt",