From d88429841307fe2f74c65c32a2fa071d558915ff Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 8 Aug 2018 15:38:37 +0200 Subject: [PATCH] Remove unused code --- README.md | 2 +- client/nuxt.config.js | 3 +-- client/src/App.vue | 50 ----------------------------------- client/src/main.js | 20 -------------- client/src/pages/index.vue | 18 +++++++------ client/src/plugins/vuetify.js | 5 ---- client/src/router/index.js | 22 --------------- client/src/store/index.js | 1 - client/src/util/uuid.js | 5 ---- 9 files changed, 12 insertions(+), 114 deletions(-) delete mode 100644 client/src/App.vue delete mode 100644 client/src/main.js delete mode 100644 client/src/plugins/vuetify.js delete mode 100644 client/src/router/index.js delete mode 100644 client/src/util/uuid.js diff --git a/README.md b/README.md index 57fe3634..9c899b35 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Sources # install dependencies npm install --prefix client -# serve with hot reload at localhost:8080 +# serve with hot reload at localhost:3000 npm run dev --prefix client # build diff --git a/client/nuxt.config.js b/client/nuxt.config.js index 5148fae2..b301655f 100644 --- a/client/nuxt.config.js +++ b/client/nuxt.config.js @@ -22,8 +22,7 @@ module.exports = { }, plugins: [ '~plugins/vue-axios', - '~plugins/vue-vimeo-player', - '~plugins/vuetify' + '~plugins/vue-vimeo-player' ], srcDir: 'src/' } diff --git a/client/src/App.vue b/client/src/App.vue deleted file mode 100644 index b9caa4f0..00000000 --- a/client/src/App.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/client/src/main.js b/client/src/main.js deleted file mode 100644 index 6ba91bf6..00000000 --- a/client/src/main.js +++ /dev/null @@ -1,20 +0,0 @@ -import 'babel-polyfill' -import Vue from 'vue' -import apolloClient from './graphql/client' -import VueApollo from 'vue-apollo' -import App from './App' - -Vue.config.productionTip = false - -Vue.use(VueApollo) - -const apolloProvider = new VueApollo({ - defaultClient: apolloClient -}) - -/* eslint-disable no-new */ -new Vue({ - el: '#app', - provide: apolloProvider.provide(), - render: h => h(App) -}) diff --git a/client/src/pages/index.vue b/client/src/pages/index.vue index f38da9e8..5c48cc9d 100644 --- a/client/src/pages/index.vue +++ b/client/src/pages/index.vue @@ -1,9 +1,11 @@ @@ -16,14 +18,14 @@ modules: [] } }, - apollo: { modules: { query: ALL_MODULES, prefetch: true, - manual: true, - result(data, loading, networkStatus) { - this.modules = data.data.modules.edges.map(entry => entry.node) + result({data, loading, networkStatus}) { + if (!loading) { + this.modules = data.modules.edges.map(node => node.node); + } } } }, diff --git a/client/src/plugins/vuetify.js b/client/src/plugins/vuetify.js deleted file mode 100644 index 01bfd807..00000000 --- a/client/src/plugins/vuetify.js +++ /dev/null @@ -1,5 +0,0 @@ -import 'vuetify/dist/vuetify.min.css' -import Vuetify from 'vuetify' -import Vue from 'vue' - -Vue.use(Vuetify) diff --git a/client/src/router/index.js b/client/src/router/index.js deleted file mode 100644 index ceba4269..00000000 --- a/client/src/router/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' -import Dashboard from '@/pages/PageDashboard' -import NotFound from '@/pages/PageNotFound' - -const routerOptions = [ - { path: '/', name: 'dashboard', component: Dashboard }, - { path: '/dashboard', name: 'dashboard', component: Dashboard }, - { path: '*', component: NotFound } -] - -const routes = routerOptions.map(route => { - return { - ...route - } -}) - -Vue.use(Router) -export default new Router({ - routes, - mode: 'history' -}) diff --git a/client/src/store/index.js b/client/src/store/index.js index 29bfd1f1..7e705109 100644 --- a/client/src/store/index.js +++ b/client/src/store/index.js @@ -1,5 +1,4 @@ import Vuex from 'vuex' -import Vue from 'vue' const createStore = () => { return new Vuex.Store({ diff --git a/client/src/util/uuid.js b/client/src/util/uuid.js deleted file mode 100644 index a667e54d..00000000 --- a/client/src/util/uuid.js +++ /dev/null @@ -1,5 +0,0 @@ -export default () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - let r = Math.random() * 16 | 0 - let v = c === 'x' ? r : (r & 0x3 | 0x8) - return v.toString(16) -})