aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--viewer/.env1
-rw-r--r--viewer/.gitignore2
-rw-r--r--viewer/.vscode/launch.json19
-rw-r--r--viewer/.vscode/tasks.json22
-rw-r--r--viewer/src/main.ts18
-rw-r--r--viewer/tsconfig.json6
-rw-r--r--viewer/visualstudio.code-workspace12
-rw-r--r--viewer/vue.config.js8
8 files changed, 73 insertions, 15 deletions
diff --git a/viewer/.env b/viewer/.env
index 9092dea..959477b 100644
--- a/viewer/.env
+++ b/viewer/.env
@@ -2,3 +2,4 @@ VUE_APP_I18N_LOCALE=en
2VUE_APP_I18N_FALLBACK_LOCALE=en 2VUE_APP_I18N_FALLBACK_LOCALE=en
3VUE_APP_EXAMPLE_PROJECT=../example/out/ 3VUE_APP_EXAMPLE_PROJECT=../example/out/
4VUE_APP_DATA_URL=gallery/ 4VUE_APP_DATA_URL=gallery/
5VUE_APP_DEVSERVER_PORT=8085
diff --git a/viewer/.gitignore b/viewer/.gitignore
index 12a8306..f1ab425 100644
--- a/viewer/.gitignore
+++ b/viewer/.gitignore
@@ -13,7 +13,7 @@ yarn-error.log*
13 13
14# Editor directories and files 14# Editor directories and files
15.idea 15.idea
16.vscode 16.vscode/settings.json
17*.suo 17*.suo
18*.ntvs* 18*.ntvs*
19*.njsproj 19*.njsproj
diff --git a/viewer/.vscode/launch.json b/viewer/.vscode/launch.json
new file mode 100644
index 0000000..d7995e5
--- /dev/null
+++ b/viewer/.vscode/launch.json
@@ -0,0 +1,19 @@
1{
2 // Use IntelliSense to learn about possible attributes.
3 // Hover to view descriptions of existing attributes.
4 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 "version": "0.2.0",
6 "configurations": [
7 {
8 "type": "chrome",
9 "request": "launch",
10 "name": "vuejs: chrome",
11 "url": "http://127.0.0.1:8085",
12 "webRoot": "${workspaceFolder}/src",
13 "breakOnLoad": true,
14 "sourceMapPathOverrides": {
15 "webpack:///./src/*": "${webRoot}/*"
16 }
17 }
18 ]
19} \ No newline at end of file
diff --git a/viewer/.vscode/tasks.json b/viewer/.vscode/tasks.json
new file mode 100644
index 0000000..3c02098
--- /dev/null
+++ b/viewer/.vscode/tasks.json
@@ -0,0 +1,22 @@
1{
2 // See https://go.microsoft.com/fwlink/?LinkId=733558
3 // for the documentation about the tasks.json format
4 "version": "2.0.0",
5 "tasks": [
6 {
7 "type": "npm",
8 "script": "build",
9 "group": {
10 "kind": "build",
11 "isDefault": true
12 }
13 },
14 {
15 "type": "npm",
16 "script": "serve",
17 "problemMatcher": [
18 "$tsc"
19 ]
20 }
21 ]
22} \ No newline at end of file
diff --git a/viewer/src/main.ts b/viewer/src/main.ts
index a8ff322..bc005c5 100644
--- a/viewer/src/main.ts
+++ b/viewer/src/main.ts
@@ -19,21 +19,23 @@
19 19
20import Vue from "vue"; 20import Vue from "vue";
21import "@/assets/scss/global.scss"; 21import "@/assets/scss/global.scss";
22import "@/components"
23import "@/plugins/fontawesome";
24import "@/plugins/buefy";
25import "@/plugins/lazyimage";
26import "@/plugins/dragscroll";
27import store from '@/store' 22import store from '@/store'
28import i18n from "@/plugins/i18n"; 23import i18n from "@/plugins/i18n";
29import router from "@/plugins/router"; 24import router from "@/plugins/router";
30import MainLayout from "@/views/MainLayout.vue";
31
32Vue.config.productionTip = false; 25Vue.config.productionTip = false;
33 26
27import(/* webpackChunkName: "ui" */ "@/plugins/buefy");
28import(/* webpackChunkName: "ui" */ "@/components");
29import(/* webpackChunkName: "ui" */ "@/plugins/lazyimage");
30import(/* webpackChunkName: "ui" */ "@/plugins/dragscroll");
31import(/* webpackChunkName: "ui" */ "@/plugins/fontawesome");
32const MainLayout = () => import(/* webpackChunkName: "ui" */ "@/views/MainLayout.vue");
33
34new Vue({ 34new Vue({
35 router, 35 router,
36 i18n, 36 i18n,
37 store, 37 store,
38 render: h => h(MainLayout) 38 render: h => h(MainLayout)
39}).$mount("#ldgallery"); 39}).$mount("#ldgallery")
40
41
diff --git a/viewer/tsconfig.json b/viewer/tsconfig.json
index 061c46c..38e14fa 100644
--- a/viewer/tsconfig.json
+++ b/viewer/tsconfig.json
@@ -14,11 +14,13 @@
14 "types": [ 14 "types": [
15 "webpack-env", 15 "webpack-env",
16 "webpack", 16 "webpack",
17 "webpack-env"
18 ], 17 ],
19 "paths": { 18 "paths": {
20 "@/*": [ 19 "@/*": [
21 "src/*" 20 "src/*"
21 ],
22 "components/*": [
23 "src/components/*"
22 ] 24 ]
23 }, 25 },
24 "lib": [ 26 "lib": [
@@ -32,8 +34,6 @@
32 "src/**/*.ts", 34 "src/**/*.ts",
33 "src/**/*.tsx", 35 "src/**/*.tsx",
34 "src/**/*.vue", 36 "src/**/*.vue",
35 "tests/**/*.ts",
36 "tests/**/*.tsx"
37 ], 37 ],
38 "exclude": [ 38 "exclude": [
39 "node_modules" 39 "node_modules"
diff --git a/viewer/visualstudio.code-workspace b/viewer/visualstudio.code-workspace
index 67b3ba9..f8d83c3 100644
--- a/viewer/visualstudio.code-workspace
+++ b/viewer/visualstudio.code-workspace
@@ -6,9 +6,17 @@
6 ], 6 ],
7 "settings": { 7 "settings": {
8 "editor.formatOnSave": true, 8 "editor.formatOnSave": true,
9 "editor.wordBasedSuggestions": false,
9 "javascript.format.semicolons": "insert", 10 "javascript.format.semicolons": "insert",
10 "typescript.disableAutomaticTypeAcquisition": true, 11 "typescript.disableAutomaticTypeAcquisition": true,
11 "vue-i18n-ally.localesPaths": "src/locales",
12 "vue-i18n-ally.keystyle": "flat", 12 "vue-i18n-ally.keystyle": "flat",
13 "vue-i18n-ally.localesPaths": "src/locales",
14 "i18n-ally.localesPaths": "src/locales",
13 } 15 }
14} \ No newline at end of file 16}
17// Recommended Visual Studio Code extensions:
18// - Vetur
19// - Vue i18n Ally
20// - SCSS Everywhere
21// - Debugger for Chrome
22// - vscode-icons
diff --git a/viewer/vue.config.js b/viewer/vue.config.js
index 67b7461..9d885bd 100644
--- a/viewer/vue.config.js
+++ b/viewer/vue.config.js
@@ -27,9 +27,15 @@ module.exports = {
27 enableInSFC: false, 27 enableInSFC: false,
28 }, 28 },
29 }, 29 },
30 chainWebpack: (config) => {
31 config.plugins.delete('prefetch');
32 },
33 configureWebpack: {
34 devtool: 'source-map'
35 },
30 productionSourceMap: false, 36 productionSourceMap: false,
31 devServer: { 37 devServer: {
32 port: 8085, 38 port: process.env.VUE_APP_DEVSERVER_PORT,
33 serveIndex: true, 39 serveIndex: true,
34 before: (app, server, compiler) => { 40 before: (app, server, compiler) => {
35 app.get(`/${process.env.VUE_APP_DATA_URL}*`, (req, res) => { 41 app.get(`/${process.env.VUE_APP_DATA_URL}*`, (req, res) => {