UNO GO BRR

main
Ethan Niser 2023-09-18 16:23:48 -05:00
parent a758749ca9
commit ccab03d078
5 changed files with 31 additions and 26 deletions

Binary file not shown.

@ -9,8 +9,8 @@
"db:push": "bunx drizzle-kit push:sqlite",
"db:studio": "bunx drizzle-kit studio",
"db:seed": "bun run src/model/store/seed.ts",
"uno": "bunx unocss",
"uno:dev": "bunx unocss --watch",
"uno": "bunx --bun unocss",
"uno:dev": "bunx --bun unocss --watch",
"typecheck": "bunx --bun tsc",
"format:check": "prettier --check .",
"format": "prettier --write . --list-different"
@ -19,6 +19,7 @@
"@ianvs/prettier-plugin-sort-imports": "^4.1.0",
"@kitajs/ts-html-plugin": "^1.0.1",
"@total-typescript/ts-reset": "^0.5.1",
"@unocss/transformer-variant-group": "^0.55.7",
"bun-types": "latest",
"concurrently": "^8.2.1",
"drizzle-kit": "^0.19.13",
@ -32,10 +33,11 @@
"@elysiajs/cron": "^0.6.0",
"@elysiajs/static": "^0.6.0",
"@elysiajs/swagger": "^0.6.2",
"@iconify-json/logos": "^1.1.37",
"@libsql/client": "0.3.5-pre.4",
"@lucia-auth/adapter-sqlite": "^2.0.0",
"@t3-oss/env-core": "^0.6.1",
"beth-stack": "0.0.14",
"beth-stack": "0.0.18",
"drizzle-orm": "^0.28.6",
"drizzle-typebox": "^0.1.1",
"elysia": "0.7.0-beta.0",

@ -1,11 +1,10 @@
import { logger } from "@bogeychan/elysia-logger";
import { bethStack } from "beth-stack/elysia";
import { Elysia } from "elysia";
import pretty from "pino-pretty";
import { auth } from "../auth";
import { config } from "../config";
import { client, db } from "../db";
import "beth-stack/jsx/register";
import { bethStack } from "beth-stack/elysia";
import { auth } from "../auth";
// import { cron } from "@elysiajs/cron";
@ -27,25 +26,25 @@ export const ctx = new Elysia({
level: config.env.LOG_LEVEL,
stream,
}),
);
// .use(
// cron({
// name: "heartbeat",
// pattern: "*/1 * * * * *",
// run() {
// if (config.env.SYNC_URL) {
// const now = performance.now();
// console.log("Syncing database...");
// void client.sync().then(() => {
// console.log(`Database synced in ${performance.now() - now}ms`);
// });
// }
// },
// })
// )
// .decorate("db", db)
// .decorate("config", config)
// .decorate("auth", auth)
)
// .use(
// cron({
// name: "heartbeat",
// pattern: "*/1 * * * * *",
// run() {
// if (config.env.SYNC_URL) {
// const now = performance.now();
// console.log("Syncing database...");
// void client.sync().then(() => {
// console.log(`Database synced in ${performance.now() - now}ms`);
// });
// }
// },
// })
// )
// .decorate("db", db)
// .decorate("config", config)
.decorate("auth", auth);
// .onStart(({ log }) => log.info("Server starting"))
// .onStop(({ log }) => log.info("Server stopping"))
// .onRequest(({ log, request }) => {

@ -44,6 +44,7 @@ export const index = new Elysia()
</button>
<br />
<div>hot reload</div>
<div class="i-logos-apple w-lg"></div>
<br />
<button
hx-get="/test"

@ -1,4 +1,5 @@
import { defineConfig } from "unocss";
import transformerVariantGroup from "@unocss/transformer-variant-group";
import { defineConfig, presetIcons, presetWebFonts, presetWind } from "unocss";
export default defineConfig({
cli: {
@ -7,4 +8,6 @@ export default defineConfig({
outFile: "public/dist/unocss.css",
},
},
presets: [presetWind(), presetIcons(), presetWebFonts()],
transformers: [transformerVariantGroup()],
});