refactor: move frontend code into view

This commit is contained in:
syntaxbullet
2026-07-02 22:50:58 +02:00
parent f9ec3e5528
commit 64838e85ba
11 changed files with 8 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import path from "node:path";
const outdir = path.join(process.cwd(), "dist"); const outdir = path.join(process.cwd(), "dist");
await rm(outdir, { recursive: true, force: true }); await rm(outdir, { recursive: true, force: true });
const entrypoints = [...new Bun.Glob("src/**/*.html").scanSync()]; const entrypoints = [...new Bun.Glob("view/**/*.html").scanSync()];
const result = await Bun.build({ const result = await Bun.build({
entrypoints, entrypoints,

View File

@@ -5,7 +5,7 @@
"tsx": true, "tsx": true,
"tailwind": { "tailwind": {
"config": "", "config": "",
"css": "styles/globals.css", "css": "view/styles/globals.css",
"baseColor": "neutral", "baseColor": "neutral",
"cssVariables": true, "cssVariables": true,
"prefix": "" "prefix": ""

View File

@@ -1,5 +1,5 @@
import { serve } from "bun"; import { serve } from "bun";
import index from "./index.html"; import index from "../view/index.html";
const server = serve({ const server = serve({
routes: { routes: {

View File

@@ -23,7 +23,9 @@
"noImplicitOverride": true, "noImplicitOverride": true,
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./view/*"],
"@view/*": ["./view/*"],
"@core/*": ["./core/*"]
}, },
// Some stricter flags (disabled by default) // Some stricter flags (disabled by default)

View File

@@ -2,7 +2,7 @@
* This file is the entry point for the React app, it sets up the root * This file is the entry point for the React app, it sets up the root
* element and renders the App component to the DOM. * element and renders the App component to the DOM.
* *
* It is included in `src/index.html`. * It is included in `view/index.html`.
*/ */
import { StrictMode } from "react"; import { StrictMode } from "react";

View File

@@ -1,4 +1,4 @@
@import "../styles/globals.css"; @import "./styles/globals.css";
@layer base { @layer base {
:root { :root {