diff --git a/ng-app-native/.gitignore b/ng-app-native/.gitignore
index a49d34c..b4dee55 100644
--- a/ng-app-native/.gitignore
+++ b/ng-app-native/.gitignore
@@ -10,6 +10,7 @@ lerna-debug.log*
node_modules
dist
dist-web
+dist-file
dist-ssr
*.local
diff --git a/ng-app-native/index.html b/ng-app-native/index.html
index 0a287f8..08ba759 100644
--- a/ng-app-native/index.html
+++ b/ng-app-native/index.html
@@ -2,7 +2,44 @@
-
+
NextGraph
diff --git a/ng-app-native/package.json b/ng-app-native/package.json
index 5394766..39f4892 100644
--- a/ng-app-native/package.json
+++ b/ng-app-native/package.json
@@ -7,6 +7,7 @@
"dev": "vite",
"webdev": "cross-env NG_APP_WEB=1 TAURI_DEBUG=1 vite",
"webbuild": "cross-env NG_APP_WEB=1 vite build",
+ "filebuild": "cross-env NG_APP_WEB=1 NG_APP_FILE=1 vite build",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
@@ -36,6 +37,13 @@
"tailwindcss": "^3.3.1",
"tslib": "^2.4.1",
"typescript": "^4.9.5",
- "vite": "^4.2.1"
+ "vite": "^4.2.1",
+ "vite-plugin-singlefile": "^0.13.5",
+ "vite-plugin-svelte-svg": "^2.2.1"
+ },
+ "pnpm": {
+ "peerDependencyRules": {
+ "ignoreMissing": ["rollup"]
+ }
}
}
diff --git a/ng-app-native/pnpm-lock.yaml b/ng-app-native/pnpm-lock.yaml
index bed661f..953ed31 100644
--- a/ng-app-native/pnpm-lock.yaml
+++ b/ng-app-native/pnpm-lock.yaml
@@ -23,6 +23,8 @@ specifiers:
tslib: ^2.4.1
typescript: ^4.9.5
vite: ^4.2.1
+ vite-plugin-singlefile: ^0.13.5
+ vite-plugin-svelte-svg: ^2.2.1
dependencies:
'@popperjs/core': 2.11.8
@@ -49,6 +51,8 @@ devDependencies:
tslib: 2.5.1
typescript: 4.9.5
vite: 4.3.8_@types+node@18.16.13
+ vite-plugin-singlefile: 0.13.5_vite@4.3.8
+ vite-plugin-svelte-svg: 2.2.1_svelte@3.59.1+vite@4.3.8
packages:
@@ -435,6 +439,11 @@ packages:
'@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.9
dev: true
+ /@trysound/sax/0.2.0:
+ resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
+ engines: {node: '>=10.13.0'}
+ dev: true
+
/@tsconfig/svelte/3.0.0:
resolution: {integrity: sha512-pYrtLtOwku/7r1i9AMONsJMVYAtk3hzOfiGNekhtq5tYBGA7unMve8RvUclKLMT3PrihvJqUmzsRGh0RP84hKg==}
dev: true
@@ -488,6 +497,10 @@ packages:
engines: {node: '>=8'}
dev: true
+ /boolbase/1.0.0:
+ resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
+ dev: true
+
/brace-expansion/1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@@ -555,6 +568,11 @@ packages:
engines: {node: '>= 6'}
dev: true
+ /commander/7.2.0:
+ resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
+ engines: {node: '>= 10'}
+ dev: true
+
/concat-map/0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true
@@ -576,12 +594,50 @@ packages:
which: 2.0.2
dev: true
+ /css-select/5.1.0:
+ resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==}
+ dependencies:
+ boolbase: 1.0.0
+ css-what: 6.1.0
+ domhandler: 5.0.3
+ domutils: 3.1.0
+ nth-check: 2.1.1
+ dev: true
+
+ /css-tree/2.2.1:
+ resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==}
+ engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
+ dependencies:
+ mdn-data: 2.0.28
+ source-map-js: 1.0.2
+ dev: true
+
+ /css-tree/2.3.1:
+ resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
+ engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
+ dependencies:
+ mdn-data: 2.0.30
+ source-map-js: 1.0.2
+ dev: true
+
+ /css-what/6.1.0:
+ resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==}
+ engines: {node: '>= 6'}
+ dev: true
+
/cssesc/3.0.0:
resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
engines: {node: '>=4'}
hasBin: true
dev: true
+ /csso/5.0.5:
+ resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==}
+ engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
+ dependencies:
+ css-tree: 2.2.1
+ dev: true
+
/debug/4.3.4:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'}
@@ -619,10 +675,42 @@ packages:
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
dev: true
+ /dom-serializer/2.0.0:
+ resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
+ dependencies:
+ domelementtype: 2.3.0
+ domhandler: 5.0.3
+ entities: 4.5.0
+ dev: true
+
+ /domelementtype/2.3.0:
+ resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
+ dev: true
+
+ /domhandler/5.0.3:
+ resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
+ engines: {node: '>= 4'}
+ dependencies:
+ domelementtype: 2.3.0
+ dev: true
+
+ /domutils/3.1.0:
+ resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
+ dependencies:
+ dom-serializer: 2.0.0
+ domelementtype: 2.3.0
+ domhandler: 5.0.3
+ dev: true
+
/electron-to-chromium/1.4.411:
resolution: {integrity: sha512-5VXLW4Qw89vM2WTICHua/y8v7fKGDRVa2VPOtBB9IpLvW316B+xd8yD1wTmLPY2ot/00P/qt87xdolj4aG/Lzg==}
dev: true
+ /entities/4.5.0:
+ resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
+ engines: {node: '>=0.12'}
+ dev: true
+
/es6-promise/3.3.1:
resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==}
dev: true
@@ -918,6 +1006,14 @@ packages:
'@jridgewell/sourcemap-codec': 1.4.15
dev: true
+ /mdn-data/2.0.28:
+ resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==}
+ dev: true
+
+ /mdn-data/2.0.30:
+ resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
+ dev: true
+
/merge-stream/2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
dev: true
@@ -1011,6 +1107,12 @@ packages:
path-key: 3.1.1
dev: true
+ /nth-check/2.1.1:
+ resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==}
+ dependencies:
+ boolbase: 1.0.0
+ dev: true
+
/object-assign/4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
@@ -1447,6 +1549,19 @@ packages:
resolution: {integrity: sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==}
engines: {node: '>= 8'}
+ /svgo/3.0.2:
+ resolution: {integrity: sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ==}
+ engines: {node: '>=14.0.0'}
+ hasBin: true
+ dependencies:
+ '@trysound/sax': 0.2.0
+ commander: 7.2.0
+ css-select: 5.1.0
+ css-tree: 2.3.1
+ csso: 5.0.5
+ picocolors: 1.0.0
+ dev: true
+
/tailwindcss/3.3.2:
resolution: {integrity: sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==}
engines: {node: '>=14.0.0'}
@@ -1534,6 +1649,31 @@ packages:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: true
+ /vite-plugin-singlefile/0.13.5_vite@4.3.8:
+ resolution: {integrity: sha512-y/aRGh8qHmw2f1IhaI/C6PJAaov47ESYDvUv1am1YHMhpY+19B5k5Odp8P+tgs+zhfvak6QB1ykrALQErEAo7g==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ peerDependencies:
+ rollup: '>=2.79.0'
+ vite: '>=3.2.0'
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+ dependencies:
+ micromatch: 4.0.5
+ vite: 4.3.8_@types+node@18.16.13
+ dev: true
+
+ /vite-plugin-svelte-svg/2.2.1_svelte@3.59.1+vite@4.3.8:
+ resolution: {integrity: sha512-CoGzvoAY02u4Haek6whVkvTPus2fIPU37dkKvlk2wBI8bB+A7UKasR8mDIbq4rH5fxvZee8UrEzLcZxNbm4bTQ==}
+ peerDependencies:
+ svelte: ^3.55.0
+ vite: < 5.0.0
+ dependencies:
+ svelte: 3.59.1
+ svgo: 3.0.2
+ vite: 4.3.8_@types+node@18.16.13
+ dev: true
+
/vite/4.3.8_@types+node@18.16.13:
resolution: {integrity: sha512-uYB8PwN7hbMrf4j1xzGDk/lqjsZvCDbt/JC5dyfxc19Pg8kRm14LinK/uq+HSLNswZEoKmweGdtpbnxRtrAXiQ==}
engines: {node: ^14.18.0 || >=16.0.0}
diff --git a/ng-app-native/public/nextgraph.svg b/ng-app-native/src/assets/nextgraph.svg
similarity index 64%
rename from ng-app-native/public/nextgraph.svg
rename to ng-app-native/src/assets/nextgraph.svg
index 37114c7..585d488 100644
--- a/ng-app-native/public/nextgraph.svg
+++ b/ng-app-native/src/assets/nextgraph.svg
@@ -1,69 +1,16 @@
+
\ No newline at end of file
diff --git a/ng-app-native/src/routes/Home.svelte b/ng-app-native/src/routes/Home.svelte
index 51d3200..37eeb7b 100644
--- a/ng-app-native/src/routes/Home.svelte
+++ b/ng-app-native/src/routes/Home.svelte
@@ -1,11 +1,12 @@
-
+
Welcome to NextGraph
diff --git a/ng-app-native/vite.config.ts b/ng-app-native/vite.config.ts
index b4cbd9c..4dba05f 100644
--- a/ng-app-native/vite.config.ts
+++ b/ng-app-native/vite.config.ts
@@ -2,6 +2,8 @@ import { defineConfig } from "vite";
import { internalIpV4 } from 'internal-ip'
import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import sveltePreprocess from "svelte-preprocess";
+import { viteSingleFile } from "vite-plugin-singlefile"
+import svelteSVG from "vite-plugin-svelte-svg";
// https://vitejs.dev/config/
export default defineConfig(async () => {
@@ -17,6 +19,22 @@ export default defineConfig(async () => {
}),
],
}),
+ svelteSVG({
+ svgoConfig: {
+ plugins: [
+ {
+ name: 'preset-default',
+ params: {
+ overrides: {
+ // disable plugins
+ removeViewBox: false,
+ },
+ },
+ },
+ ],
+ }, // See https://github.com/svg/svgo#configuration
+ requireSuffix: true, // Set false to accept '.svg' without the '?component'
+ }),
],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
@@ -37,7 +55,7 @@ export default defineConfig(async () => {
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
envPrefix: ["VITE_", "TAURI_", "NG_"],
build: {
- outDir: process.env.NG_APP_WEB ? 'dist-web' : 'dist',
+ outDir: process.env.NG_APP_WEB ? process.env.NG_APP_FILE ? 'dist-file' : 'dist-web' : 'dist',
// Tauri supports es2021
target: process.env.NG_APP_WEB ? 'modules' : process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13",
// don't minify for debug builds
@@ -46,5 +64,6 @@ export default defineConfig(async () => {
sourcemap: !!process.env.TAURI_DEBUG,
},
}
+if (process.env.NG_APP_FILE) config.plugins.push(viteSingleFile());
return config
})