Compare commits
2 Commits
714d162c63
...
33d228c9ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33d228c9ac | ||
|
|
e938d15dc6 |
5
CHANGELOG.md
Normal file
5
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
## 2026-01-15
|
||||
|
||||
- All frontend code now lives in `src/client/`
|
||||
- All backend code now lives in `src/server/`
|
||||
- ^^ This is a change from `src/js/` being for frontend and just `src/` for backend
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"hype": "file:..",
|
||||
},
|
||||
"scripts": {
|
||||
"start": "bun run src/server.ts",
|
||||
"dev": "bun run --hot src/server.ts"
|
||||
"start": "bun run src/server/index.ts",
|
||||
"dev": "bun run --hot src/server/index.ts"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import defaultLayout from './layout'
|
|||
import { feFunctions, fnStorage } from './frontend'
|
||||
|
||||
const SHOW_HTTP_LOG = true
|
||||
const CSS_RESET = await Bun.file(join(import.meta.dir, '/reset.css')).text()
|
||||
const PICO_CSS = await Bun.file(join(import.meta.dir, '/pico.css')).text()
|
||||
const CSS_RESET = await Bun.file(join(import.meta.dir, '/css/reset.css')).text()
|
||||
const PICO_CSS = await Bun.file(join(import.meta.dir, '/css/pico.css')).text()
|
||||
|
||||
export * from './utils'
|
||||
export { frontend } from './frontend'
|
||||
|
|
@ -116,7 +116,7 @@ export class Hype<
|
|||
this.get('/css/pico.css', async c => new Response(PICO_CSS, { headers: { 'Content-Type': 'text/css' } }))
|
||||
|
||||
// serve transpiled js
|
||||
this.on('GET', ['/js/:path{.+}', '/shared/:path{.+}'], async c => {
|
||||
this.on('GET', ['/client/:path{.+}', '/shared/:path{.+}'], async c => {
|
||||
let path = './src/' + c.req.path.replace('..', '.')
|
||||
|
||||
// path must end in .js or .ts
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const Layout: FC = ({ children, title, props }) =>
|
|||
{props.reset && <link href="/css/reset.css" rel="stylesheet" />}
|
||||
{props.pico && <link href="/css/pico.css" rel="stylesheet" />}
|
||||
<link href="/css/main.css" rel="stylesheet" />
|
||||
<script src="/js/main.ts" type="module"></script>
|
||||
<script src="/client/main.ts" type="module"></script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user