refactor: move frontend code into view
This commit is contained in:
2
build.ts
2
build.ts
@@ -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,
|
||||||
|
|||||||
@@ -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": ""
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
@import "../styles/globals.css";
|
@import "./styles/globals.css";
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root {
|
:root {
|
||||||
Reference in New Issue
Block a user