big reorg, move frontend to the top level, moves yarn, node_modules, vite, etc.

This commit is contained in:
sawka
2024-05-13 21:42:25 -07:00
parent 03262fdefa
commit 77a4987384
42 changed files with 1018 additions and 50 deletions
+3
View File
@@ -1,7 +1,10 @@
.task
frontend/dist
dist/
frontend/node_modules
node_modules/
frontend/bindings
bindings/
*.log
bin/
*.dmg
-3
View File
@@ -350,7 +350,6 @@ tasks:
install:frontend:deps:
summary: Install frontend dependencies
dir: frontend
sources:
- package.json
- yarn.lock
@@ -364,7 +363,6 @@ tasks:
build:frontend:
summary: Build the frontend project
dir: frontend
sources:
- "**/*"
generates:
@@ -416,7 +414,6 @@ tasks:
dev:frontend:
summary: Runs the frontend in development mode
dir: frontend
deps:
- task: install:frontend:deps
cmds:
+3 -6
View File
@@ -3,18 +3,15 @@
import * as React from "react";
import * as jotai from "jotai";
import { Provider, createStore } from "jotai";
import { atomWithObservable } from "jotai/utils";
import { Greet } from "./bindings/main/GreetService.js";
import { Events } from "@wailsio/runtime";
import { Provider } from "jotai";
import * as rx from "rxjs";
import { clsx } from "clsx";
import { TabContent } from "./tab.tsx";
import { TabContent } from "@/app/tab/tab";
import { v4 as uuidv4 } from "uuid";
import "/public/style.less";
const jotaiStore = createStore();
const jotaiStore = jotai.createStore();
const tabArr = [
{ name: "Tab 1", tabid: uuidv4() },
@@ -3,7 +3,7 @@
import * as React from "react";
import * as jotai from "jotai";
import { Block } from "./block.tsx";
import { Block } from "../block/block.tsx";
import { v4 as uuidv4 } from "uuid";
import "./tab.less";
-17
View File
@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wails App</title>
<link rel="stylesheet" href="public/fontawesome/css/fontawesome.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/brands.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-solid.min.css" />
<link rel="stylesheet" href="public/fontawesome/css/sharp-regular.min.css" />
<script type="module" src="/main.ts"></script>
</head>
<body>
<div id="main"></div>
</body>
</html>
+12 -12
View File
@@ -17,15 +17,15 @@ function loadJetBrainsMonoFont() {
return;
}
isJetBrainsMonoLoaded = true;
const jbmFontNormal = new FontFace("JetBrains Mono", "url('public/fonts/jetbrains-mono-v13-latin-regular.woff2')", {
const jbmFontNormal = new FontFace("JetBrains Mono", "url('/fonts/jetbrains-mono-v13-latin-regular.woff2')", {
style: "normal",
weight: "400",
});
const jbmFont200 = new FontFace("JetBrains Mono", "url('public/fonts/jetbrains-mono-v13-latin-200.woff2')", {
const jbmFont200 = new FontFace("JetBrains Mono", "url('/fonts/jetbrains-mono-v13-latin-200.woff2')", {
style: "normal",
weight: "200",
});
const jbmFont700 = new FontFace("JetBrains Mono", "url('public/fonts/jetbrains-mono-v13-latin-700.woff2')", {
const jbmFont700 = new FontFace("JetBrains Mono", "url('/fonts/jetbrains-mono-v13-latin-700.woff2')", {
style: "normal",
weight: "700",
});
@@ -42,11 +42,11 @@ function loadLatoFont() {
return;
}
isLatoFontLoaded = true;
const latoFont = new FontFace("Lato", "url('public/fonts/lato-regular.woff')", {
const latoFont = new FontFace("Lato", "url('/fonts/lato-regular.woff')", {
style: "normal",
weight: "400",
});
const latoFontBold = new FontFace("Lato", "url('public/fonts/lato-bold.woff')", {
const latoFontBold = new FontFace("Lato", "url('/fonts/lato-bold.woff')", {
style: "normal",
weight: "700",
});
@@ -61,11 +61,11 @@ function loadFiraCodeFont() {
return;
}
isFiraCodeLoaded = true;
let firaCodeRegular = new FontFace("Fira Code", "url('public/fonts/firacode-regular.woff2')", {
let firaCodeRegular = new FontFace("Fira Code", "url('/fonts/firacode-regular.woff2')", {
style: "normal",
weight: "400",
});
let firaCodeBold = new FontFace("Fira Code", "url('public/fonts/firacode-bold.woff2')", {
let firaCodeBold = new FontFace("Fira Code", "url('/fonts/firacode-bold.woff2')", {
style: "normal",
weight: "700",
});
@@ -80,19 +80,19 @@ function loadHackFont() {
return;
}
isHackFontLoaded = true;
let hackRegular = new FontFace("Hack", "url('public/fonts/hack-regular.woff2')", {
let hackRegular = new FontFace("Hack", "url('/fonts/hack-regular.woff2')", {
style: "normal",
weight: "400",
});
let hackBold = new FontFace("Hack", "url('public/fonts/hack-bold.woff2')", {
let hackBold = new FontFace("Hack", "url('/fonts/hack-bold.woff2')", {
style: "normal",
weight: "700",
});
let hackItalic = new FontFace("Hack", "url('public/fonts/hack-italic.woff2')", {
let hackItalic = new FontFace("Hack", "url('/fonts/hack-italic.woff2')", {
style: "italic",
weight: "400",
});
let hackBoldItalic = new FontFace("Hack", "url('public/fonts/hack-bolditalic.woff2')", {
let hackBoldItalic = new FontFace("Hack", "url('/fonts/hack-bolditalic.woff2')", {
style: "italic",
weight: "700",
});
@@ -111,7 +111,7 @@ function loadBaseFonts() {
return;
}
isBaseFontsLoaded = true;
let mmFont = new FontFace("Martian Mono", "url(public/fonts/MartianMono-VariableFont_wdth,wght.ttf)", {
let mmFont = new FontFace("Martian Mono", "url(/fonts/MartianMono-VariableFont_wdth,wght.ttf)", {
style: "normal",
weight: "normal",
});
-6
View File
@@ -1,6 +0,0 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react({})],
});
+2 -2
View File
@@ -3,8 +3,8 @@
import * as React from "react";
import { createRoot } from "react-dom/client";
import { App } from "./app.tsx";
import { loadFonts } from "./util/fontutil.ts";
import { App } from "./app/app";
import { loadFonts } from "./util/fontutil";
loadFonts();
+2 -2
View File
@@ -15,7 +15,7 @@ import (
"github.com/wailsapp/wails/v3/pkg/application"
)
//go:embed frontend/dist
//go:embed dist
var assets embed.FS
//go:embed build/appicon.png
@@ -63,7 +63,7 @@ func main() {
TitleBar: application.MacTitleBarHiddenInset,
},
BackgroundColour: application.NewRGB(27, 38, 54),
URL: "/",
URL: "/public/index.html",
})
// blocking
+2 -1
View File
@@ -13,7 +13,8 @@
"@vitejs/plugin-react": "^4.2.1",
"@wailsio/runtime": "latest",
"less": "^4.2.0",
"vite": "^5.0.0"
"vite": "^5.0.0",
"vite-tsconfig-paths": "^4.3.2"
},
"dependencies": {
"@xterm/addon-fit": "^0.10.0",

Some files were not shown because too many files have changed in this diff Show More