From 7001052fe310ef61345b32e994e2a16f8828b8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 20 Dec 2019 14:01:36 +0100 Subject: [PATCH] first commit --- package-lock.json | 54 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 7 +++++- src/App.vue | 32 +++++++++++++++------------ src/main.js | 6 ++++- src/router/index.js | 27 +++++++++++++++++++++++ src/store/index.js | 15 +++++++++++++ src/views/About.vue | 5 +++++ src/views/Home.vue | 18 +++++++++++++++ 8 files changed, 148 insertions(+), 16 deletions(-) create mode 100644 src/router/index.js create mode 100644 src/store/index.js create mode 100644 src/views/About.vue create mode 100644 src/views/Home.vue diff --git a/package-lock.json b/package-lock.json index 25ff1b1..40d5dc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6155,6 +6155,12 @@ } } }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -8796,6 +8802,15 @@ "readable-stream": "^2.0.2" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -9403,6 +9418,17 @@ "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "dev": true }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -10692,6 +10718,24 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz", "integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==" }, + "vue-cli-plugin-vuetify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-2.0.2.tgz", + "integrity": "sha512-OJ1YUSfDlQibj111QMGv4a44atmtWdrkynk4voiEuivUqLcZGCJyF/A8ae0VojpMU2jlvZydz0nXjmZmcg+Nqw==", + "dev": true, + "requires": { + "semver": "^6.0.0", + "shelljs": "^0.8.3" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "vue-eslint-parser": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", @@ -10738,6 +10782,11 @@ "vue-style-loader": "^4.1.0" } }, + "vue-router": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz", + "integrity": "sha512-8iSa4mGNXBjyuSZFCCO4fiKfvzqk+mhL0lnKuGcQtO1eoj8nq3CmbEG8FwK5QqoqwDgsjsf1GDuisDX4cdb/aQ==" + }, "vue-style-loader": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", @@ -10764,6 +10813,11 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vuex": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.2.tgz", + "integrity": "sha512-ha3jNLJqNhhrAemDXcmMJMKf1Zu4sybMPr9KxJIuOpVcsDQlTBYLLladav2U+g1AvdYDG5Gs0xBTb0M5pXXYFQ==" + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", diff --git a/package.json b/package.json index f1adf68..dce5555 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,20 @@ }, "dependencies": { "core-js": "^3.4.3", - "vue": "^2.6.10" + "vue": "^2.6.10", + "vue-router": "^3.1.3", + "vuex": "^3.1.2" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-eslint": "^4.1.0", + "@vue/cli-plugin-router": "^4.1.1", + "@vue/cli-plugin-vuex": "^4.1.1", "@vue/cli-service": "^4.1.0", "babel-eslint": "^10.0.3", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", + "vue-cli-plugin-vuetify": "^2.0.2", "vue-template-compiler": "^2.6.10" }, "eslintConfig": { diff --git a/src/App.vue b/src/App.vue index fcc5662..8534514 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,21 +1,13 @@ - - diff --git a/src/main.js b/src/main.js index 63eb05f..f253456 100644 --- a/src/main.js +++ b/src/main.js @@ -1,8 +1,12 @@ import Vue from 'vue' import App from './App.vue' +import router from './router' +import store from './store' Vue.config.productionTip = false new Vue({ - render: h => h(App), + router, + store, + render: h => h(App) }).$mount('#app') diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..9d86d9d --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,27 @@ +import Vue from 'vue' +import VueRouter from 'vue-router' +import Home from '../views/Home.vue' + +Vue.use(VueRouter) + +const routes = [ + { + path: '/', + name: 'home', + component: Home + }, + { + path: '/about', + name: 'about', + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') + } +] + +const router = new VueRouter({ + routes +}) + +export default router diff --git a/src/store/index.js b/src/store/index.js new file mode 100644 index 0000000..332b916 --- /dev/null +++ b/src/store/index.js @@ -0,0 +1,15 @@ +import Vue from 'vue' +import Vuex from 'vuex' + +Vue.use(Vuex) + +export default new Vuex.Store({ + state: { + }, + mutations: { + }, + actions: { + }, + modules: { + } +}) diff --git a/src/views/About.vue b/src/views/About.vue new file mode 100644 index 0000000..3fa2807 --- /dev/null +++ b/src/views/About.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/Home.vue b/src/views/Home.vue new file mode 100644 index 0000000..fc2e940 --- /dev/null +++ b/src/views/Home.vue @@ -0,0 +1,18 @@ + + +