mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
42 lines
No EOL
1.1 KiB
HTML
42 lines
No EOL
1.1 KiB
HTML
<!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" />
|
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
|
|
<title>FreeDATA</title>
|
|
</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> |