FreeDATA/gui_vue/index.html

42 lines
1.1 KiB
HTML
Raw Normal View History

2023-09-02 11:37:03 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2023-10-04 17:54:50 +00:00
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
2023-09-05 19:06:48 +00:00
<title>FreeDATA</title>
2023-09-02 11:37:03 +00:00
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
<script type="module">
// debugging code for figuring out correct folder structure in build environment
console.log(process.env)
import { readdir } from 'node:fs/promises';
import { readdirSync } from 'fs'
import { join } from 'path'
function walk(dir) {
return readdirSync(dir, { withFileTypes: true }).flatMap((file) => file.isDirectory() ? walk(join(dir, file.name)) : join(dir, file.name))
}
if (process.env["NODE_ENV"] == "production"){
console.log(walk(process.env["APPDIR"]))
console.log(walk(process.env["DIST"]))
console.log(walk(process.env["DIST_ELECTRON"]))
} else {
console.log("running in " + process.env["NODE_ENV"])
}
</script>