diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..6d57a96
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,51 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "npm install",
+ "type": "npm",
+ "script": "install",
+ "options": {
+ "cwd": "${workspaceFolder}/frontend"
+ },
+ "presentation": {
+ "clear": true,
+ "panel": "shared",
+ "showReuseMessage": false
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "npm run build",
+ "type": "npm",
+ "script": "build",
+ "options": {
+ "cwd": "${workspaceFolder}/frontend"
+ },
+ "presentation": {
+ "clear": true,
+ "panel": "shared",
+ "showReuseMessage": false
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "build",
+ "type": "shell",
+ "options": {
+ "cwd": "${workspaceFolder}"
+ },
+ "command": "go",
+ "args": [
+ "build",
+ "-tags",
+ "dev",
+ "-gcflags",
+ "all=-N -l",
+ "-o",
+ "build/bin/vscode.exe"
+ ],
+ "dependsOn": ["npm install", "npm run build"]
+ }
+ ]
+}
diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json
index 3918b4f..9660d5f 100644
--- a/frontend/jsconfig.json
+++ b/frontend/jsconfig.json
@@ -3,33 +3,22 @@
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
- /**
- * svelte-preprocess cannot figure out whether you have
- * a value or a type, so tell TypeScript to enforce using
- * `import type` instead of `import` for Types.
- */
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
- /**
- * To have warnings / errors of the Svelte compiler at the
- * correct position, enable source maps by default.
- */
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
- /**
- * Typecheck JS in `.svelte` and `.js` files by default.
- * Disable this if you'd like to use dynamic types.
- */
- "checkJs": true
+ "checkJs": true,
+ "paths": {
+ "$components/*": ["src/components/*"],
+ "$organisms/*": ["src/organisms/*"],
+ "$wails/*": ["wailsjs/*"],
+ "$lib/*": ["src/lib/*"]
+ }
},
- /**
- * Use global.d.ts instead of compilerOptions.types
- * to avoid limiting type declarations.
- */
"include": [
"src/**/*.d.ts",
"src/**/*.js",
diff --git a/frontend/src/app.svelte b/frontend/src/app.svelte
index 14d65de..f03b9d7 100644
--- a/frontend/src/app.svelte
+++ b/frontend/src/app.svelte
@@ -1,13 +1,13 @@
diff --git a/frontend/src/organisms/connection/collection/components/form.svelte b/frontend/src/organisms/connection/collection/components/form.svelte
index b5e2798..eb777ce 100644
--- a/frontend/src/organisms/connection/collection/components/form.svelte
+++ b/frontend/src/organisms/connection/collection/components/form.svelte
@@ -1,7 +1,8 @@
diff --git a/frontend/src/organisms/connection/collection/update.svelte b/frontend/src/organisms/connection/collection/update.svelte
index 4482472..ad68597 100644
--- a/frontend/src/organisms/connection/collection/update.svelte
+++ b/frontend/src/organisms/connection/collection/update.svelte
@@ -1,8 +1,8 @@
diff --git a/frontend/vite.config.js b/frontend/vite.config.js
index f7acf5d..f0efb9a 100644
--- a/frontend/vite.config.js
+++ b/frontend/vite.config.js
@@ -1,7 +1,18 @@
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
+import { dirname } from 'path';
+import { fileURLToPath } from 'url';
+
+const currentDir = dirname(fileURLToPath(import.meta.url));
-// https://vitejs.dev/config/
export default defineConfig({
plugins: [ svelte() ],
+ resolve: {
+ alias: {
+ '$components': currentDir + '/src/components',
+ '$organisms': currentDir + '/src/organisms',
+ '$wails': currentDir + '/wailsjs',
+ '$lib': currentDir + '/src/lib',
+ },
+ },
});