Initial commit of some work creating RMO single-page app
Doesn't work yet, but they both start, so checkpoint.
This commit is contained in:
parent
54e77f72f4
commit
d7d6888f63
11 changed files with 229 additions and 5 deletions
13
index-rmo.html
Normal file
13
index-rmo.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/static/ico/favicon-sync.ico" type="image/x-icon" />
|
||||
<title>Nidus Sync</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/ts/main-rmo.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
13
index-sync.html
Normal file
13
index-sync.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" href="/static/ico/favicon-sync.ico" type="image/x-icon" />
|
||||
<title>Nidus Sync</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/ts/main-rmo.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -8,6 +8,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/ts/main.ts"></script>
|
||||
<script type="module" src="/ts/main-rmo.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
"dependencies": {
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"@vueuse/head": "^2.0.0",
|
||||
"axios": "^1.13.6",
|
||||
"bootstrap": "^5.3.8",
|
||||
"bootstrap-icons": "^1.13.1",
|
||||
|
|
@ -25,7 +26,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "vue-tsc && vite build",
|
||||
"dev": "vite",
|
||||
"dev-rmo": "vite --config vite/rmo.ts",
|
||||
"dev-sync": "vite --config vite/sync.ts",
|
||||
"generate-icons": "node generate-icons.js",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"typecheck:watch": "vue-tsc --noEmit --watch"
|
||||
|
|
|
|||
81
pnpm-lock.yaml
generated
81
pnpm-lock.yaml
generated
|
|
@ -14,6 +14,9 @@ importers:
|
|||
'@vueuse/core':
|
||||
specifier: ^14.2.1
|
||||
version: 14.2.1(vue@3.5.30(typescript@5.9.3))
|
||||
'@vueuse/head':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0(vue@3.5.30(typescript@5.9.3))
|
||||
axios:
|
||||
specifier: ^1.13.6
|
||||
version: 1.13.6
|
||||
|
|
@ -347,6 +350,23 @@ packages:
|
|||
'@types/web-bluetooth@0.0.21':
|
||||
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
|
||||
|
||||
'@unhead/dom@1.11.20':
|
||||
resolution: {integrity: sha512-jgfGYdOH+xHJF/j8gudjsYu3oIjFyXhCWcgKaw3vQnT616gSqyqnGQGOItL+BQtQZACKNISwIfx5PuOtztMKLA==}
|
||||
|
||||
'@unhead/schema@1.11.20':
|
||||
resolution: {integrity: sha512-0zWykKAaJdm+/Y7yi/Yds20PrUK7XabLe9c3IRcjnwYmSWY6z0Cr19VIs3ozCj8P+GhR+/TI2mwtGlueCEYouA==}
|
||||
|
||||
'@unhead/shared@1.11.20':
|
||||
resolution: {integrity: sha512-1MOrBkGgkUXS+sOKz/DBh4U20DNoITlJwpmvSInxEUNhghSNb56S0RnaHRq0iHkhrO/cDgz2zvfdlRpoPLGI3w==}
|
||||
|
||||
'@unhead/ssr@1.11.20':
|
||||
resolution: {integrity: sha512-j6ehzmdWGAvv0TEZyLE3WBnG1ULnsbKQcLqBDh3fvKS6b3xutcVZB7mjvrVE7ckSZt6WwOtG0ED3NJDS7IjzBA==}
|
||||
|
||||
'@unhead/vue@1.11.20':
|
||||
resolution: {integrity: sha512-sqQaLbwqY9TvLEGeq8Fd7+F2TIuV3nZ5ihVISHjWpAM3y7DwNWRU7NmT9+yYT+2/jw1Vjwdkv5/HvDnvCLrgmg==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
|
||||
'@vitejs/plugin-vue@6.0.5':
|
||||
resolution: {integrity: sha512-bL3AxKuQySfk1iGcBsQnoRVexTPJq0Z/ixFVM8OhVJAP6ZXXXLtM7NFKWhLl30Kg7uTBqIaPXbh+nuQCuBDedg==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
|
|
@ -427,6 +447,11 @@ packages:
|
|||
peerDependencies:
|
||||
vue: ^3.5.0
|
||||
|
||||
'@vueuse/head@2.0.0':
|
||||
resolution: {integrity: sha512-ykdOxTGs95xjD4WXE4na/umxZea2Itl0GWBILas+O4oqS7eXIods38INvk3XkJKjqMdWPcpCyLX/DioLQxU1KA==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
|
||||
'@vueuse/metadata@14.2.1':
|
||||
resolution: {integrity: sha512-1ButlVtj5Sb/HDtIy1HFr1VqCP4G6Ypqt5MAo0lCgjokrk2mvQKsK2uuy0vqu/Ks+sHfuHo0B9Y9jn9xKdjZsw==}
|
||||
|
||||
|
|
@ -756,6 +781,9 @@ packages:
|
|||
resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
packrup@0.1.2:
|
||||
resolution: {integrity: sha512-ZcKU7zrr5GlonoS9cxxrb5HVswGnyj6jQvwFBa6p5VFw7G71VAHcUKL5wyZSU/ECtPM/9gacWxy2KFQKt1gMNA==}
|
||||
|
||||
path-browserify@1.0.1:
|
||||
resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
|
||||
|
||||
|
|
@ -883,6 +911,9 @@ packages:
|
|||
ufo@1.6.3:
|
||||
resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==}
|
||||
|
||||
unhead@1.11.20:
|
||||
resolution: {integrity: sha512-3AsNQC0pjwlLqEYHLjtichGWankK8yqmocReITecmpB1H0aOabeESueyy+8X1gyJx4ftZVwo9hqQ4O3fPWffCA==}
|
||||
|
||||
unicorn-magic@0.3.0:
|
||||
resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==}
|
||||
engines: {node: '>=18'}
|
||||
|
|
@ -1015,6 +1046,9 @@ packages:
|
|||
engines: {node: '>= 14.6'}
|
||||
hasBin: true
|
||||
|
||||
zhead@2.2.4:
|
||||
resolution: {integrity: sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==}
|
||||
|
||||
snapshots:
|
||||
|
||||
'@babel/code-frame@7.29.0':
|
||||
|
|
@ -1265,6 +1299,34 @@ snapshots:
|
|||
|
||||
'@types/web-bluetooth@0.0.21': {}
|
||||
|
||||
'@unhead/dom@1.11.20':
|
||||
dependencies:
|
||||
'@unhead/schema': 1.11.20
|
||||
'@unhead/shared': 1.11.20
|
||||
|
||||
'@unhead/schema@1.11.20':
|
||||
dependencies:
|
||||
hookable: 5.5.3
|
||||
zhead: 2.2.4
|
||||
|
||||
'@unhead/shared@1.11.20':
|
||||
dependencies:
|
||||
'@unhead/schema': 1.11.20
|
||||
packrup: 0.1.2
|
||||
|
||||
'@unhead/ssr@1.11.20':
|
||||
dependencies:
|
||||
'@unhead/schema': 1.11.20
|
||||
'@unhead/shared': 1.11.20
|
||||
|
||||
'@unhead/vue@1.11.20(vue@3.5.30(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@unhead/schema': 1.11.20
|
||||
'@unhead/shared': 1.11.20
|
||||
hookable: 5.5.3
|
||||
unhead: 1.11.20
|
||||
vue: 3.5.30(typescript@5.9.3)
|
||||
|
||||
'@vitejs/plugin-vue@6.0.5(vite@8.0.1(sass@1.98.0)(yaml@2.8.3))(vue@3.5.30(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@rolldown/pluginutils': 1.0.0-rc.2
|
||||
|
|
@ -1395,6 +1457,14 @@ snapshots:
|
|||
'@vueuse/shared': 14.2.1(vue@3.5.30(typescript@5.9.3))
|
||||
vue: 3.5.30(typescript@5.9.3)
|
||||
|
||||
'@vueuse/head@2.0.0(vue@3.5.30(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@unhead/dom': 1.11.20
|
||||
'@unhead/schema': 1.11.20
|
||||
'@unhead/ssr': 1.11.20
|
||||
'@unhead/vue': 1.11.20(vue@3.5.30(typescript@5.9.3))
|
||||
vue: 3.5.30(typescript@5.9.3)
|
||||
|
||||
'@vueuse/metadata@14.2.1': {}
|
||||
|
||||
'@vueuse/shared@14.2.1(vue@3.5.30(typescript@5.9.3))':
|
||||
|
|
@ -1686,6 +1756,8 @@ snapshots:
|
|||
path-key: 4.0.0
|
||||
unicorn-magic: 0.3.0
|
||||
|
||||
packrup@0.1.2: {}
|
||||
|
||||
path-browserify@1.0.1: {}
|
||||
|
||||
path-key@4.0.0: {}
|
||||
|
|
@ -1810,6 +1882,13 @@ snapshots:
|
|||
|
||||
ufo@1.6.3: {}
|
||||
|
||||
unhead@1.11.20:
|
||||
dependencies:
|
||||
'@unhead/dom': 1.11.20
|
||||
'@unhead/schema': 1.11.20
|
||||
'@unhead/shared': 1.11.20
|
||||
hookable: 5.5.3
|
||||
|
||||
unicorn-magic@0.3.0: {}
|
||||
|
||||
unplugin-utils@0.3.1:
|
||||
|
|
@ -1895,3 +1974,5 @@ snapshots:
|
|||
webpack-virtual-modules@0.6.2: {}
|
||||
|
||||
yaml@2.8.3: {}
|
||||
|
||||
zhead@2.2.4: {}
|
||||
|
|
|
|||
31
ts/AppRMO.vue
Normal file
31
ts/AppRMO.vue
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed } from "vue";
|
||||
import { useHead } from "@vueuse/head";
|
||||
|
||||
const count = ref<number>(0);
|
||||
const message = ref<string>("hey");
|
||||
|
||||
const increment = (): void => {
|
||||
count.value++;
|
||||
};
|
||||
|
||||
// Reactive head management
|
||||
useHead({
|
||||
title: computed(() => `Count: ${count.value} - My Vue App`),
|
||||
link: [
|
||||
{
|
||||
rel: "icon",
|
||||
type: "image/x-icon",
|
||||
href: "/favicon.ico",
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="app">
|
||||
<h1>{{ message }}</h1>
|
||||
<p>Count: {{ count }}</p>
|
||||
<button @click="increment">Increment</button>
|
||||
</div>
|
||||
</template>
|
||||
9
ts/main-rmo.ts
Normal file
9
ts/main-rmo.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { createApp } from "vue";
|
||||
import { createHead } from "@vueuse/head";
|
||||
import App from "./AppRMO.vue";
|
||||
|
||||
const app = createApp(App);
|
||||
const head = createHead();
|
||||
|
||||
app.use(head);
|
||||
app.mount("#app");
|
||||
71
vite/rmo.ts
Normal file
71
vite/rmo.ts
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import checker from "vite-plugin-checker";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
checker({
|
||||
vueTsc: true,
|
||||
}),
|
||||
],
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "../ts"),
|
||||
},
|
||||
},
|
||||
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "sass:map";\n@import "@/style/variables.scss";`,
|
||||
api: "modern-compiler",
|
||||
silenceDeprecations: [
|
||||
"import",
|
||||
"global-builtin",
|
||||
"if-function",
|
||||
"color-functions",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
manifest: true,
|
||||
outDir: "static/gen",
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "../ts/main-rmo.ts"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
chunkFileNames: "js/[name].[hash].js",
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) {
|
||||
return "fonts/[name].[hash][extname]";
|
||||
}
|
||||
if (/\.css$/.test(assetInfo.name || "")) {
|
||||
return "css/style.[hash][extname]";
|
||||
}
|
||||
return "assets/[name].[hash][extname]";
|
||||
},
|
||||
},
|
||||
},
|
||||
sourcemap: true,
|
||||
},
|
||||
|
||||
server: {
|
||||
allowedHosts: ["poweredge.local", "dev-report.mosquitoes.online"],
|
||||
port: 9001,
|
||||
/*proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:9002",
|
||||
changeOrigin: false,
|
||||
},
|
||||
},*/
|
||||
strictPort: true,
|
||||
},
|
||||
});
|
||||
|
|
@ -13,7 +13,7 @@ export default defineConfig({
|
|||
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./ts"),
|
||||
"@": path.resolve(__dirname, "../ts"),
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ export default defineConfig({
|
|||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, "ts/main.ts"),
|
||||
main: path.resolve(__dirname, "index-sync.html"),
|
||||
},
|
||||
output: {
|
||||
entryFileNames: "js/bundle.[hash].js",
|
||||
|
|
@ -58,7 +58,11 @@ export default defineConfig({
|
|||
},
|
||||
|
||||
server: {
|
||||
allowedHosts: ["poweredge.local", "dev-sync.nidus.cloud"],
|
||||
allowedHosts: [
|
||||
"poweredge.local",
|
||||
"dev-report.mosquitoes.online",
|
||||
"dev-sync.nidus.cloud",
|
||||
],
|
||||
port: 9000,
|
||||
proxy: {
|
||||
"/api": {
|
||||
Loading…
Add table
Add a link
Reference in a new issue