Skip to content

Commit

Permalink
add build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tireymorris committed Jun 23, 2024
1 parent 1d3293b commit 0c67ccd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ package-lock.json
**/*.bun

server
worker

db.sqlite
*.db
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "hyperwave",
"version": "0.2.1",
"scripts": {
"build": "bun build:css && bun build --compile ./src/server.tsx",
"build": "bun build:css && bun build:server && bun build:worker",
"build:server": "bun build --compile ./src/server.tsx",
"build:worker": "bun build --compile ./src/worker.ts",
"build:css": "unocss \"src/**/*.tsx\" -o public/styles/uno.css",
"css": "unocss --watch \"src/**/*.tsx\" -o public/styles/uno.css",
"db": "bun run src/db.ts",
Expand Down
2 changes: 2 additions & 0 deletions public/styles/uno.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.mb-3{margin-bottom:0.75rem;}
.mb-4{margin-bottom:1rem;}
.mr-4{margin-right:1rem;}
.box-border{box-sizing:border-box;}
.hidden{display:none;}
.h-1\/4{height:25%;}
.h-16{height:4rem;}
Expand Down Expand Up @@ -67,6 +68,7 @@
.py-1{padding-top:0.25rem;padding-bottom:0.25rem;}
.py-2{padding-top:0.5rem;padding-bottom:0.5rem;}
.pl-3{padding-left:0.75rem;}
.pl-4{padding-left:1rem;}
.pr-10{padding-right:2.5rem;}
.text-center{text-align:center;}
.text-3xl{font-size:1.875rem;line-height:2.25rem;}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Layout({ title, children }: LayoutProps) {
<script src="https://unpkg.com/[email protected]"></script>
<EnableDarkMode />
</head>
<body className="font-lato m-0 bg-white dark:bg-gray-900 p-0 text-black dark:text-white">
<body className="font-lato m-0 bg-white dark:bg-gray-900 p-0 text-black dark:text-white box-border">
{children}
</body>
</html>
Expand Down
4 changes: 2 additions & 2 deletions src/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.get("/", async (c) => {
return c.html(
<Layout title="hyperwave">
<div class="flex flex-col items-center gap-2 p-4 min-h-screen text-base">
<header class="w-full h-1/4 flex items-center justify-center bg-gradient-to-r from-blue-500 to-purple-500 text-white shadow-lg mb-4">
<header class="w-full h-1/4 flex items-center bg-gradient-to-r from-blue-500 to-purple-500 text-white shadow-lg mb-4 pl-4">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
Expand All @@ -36,7 +36,7 @@ app.get("/", async (c) => {
d="M4 6h16M4 10h16M4 14h10M4 18h10M2 4v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4"
/>
</svg>
<h1 class="text-3xl font-serif italic">🌊hyperwave news</h1>
<h1 class="text-3xl font-serif italic">hyperwave news</h1>
</header>

<div
Expand Down

0 comments on commit 0c67ccd

Please sign in to comment.