src/js/ => src/client/

This commit is contained in:
Chris Wanstrath 2026-01-15 12:54:28 -08:00
parent 714d162c63
commit e938d15dc6
6 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
"hype": "file:..", "hype": "file:..",
}, },
"scripts": { "scripts": {
"start": "bun run src/server.ts", "start": "bun run src/server/index.ts",
"dev": "bun run --hot src/server.ts" "dev": "bun run --hot src/server/index.ts"
} }
} }

View File

@ -116,7 +116,7 @@ export class Hype<
this.get('/css/pico.css', async c => new Response(PICO_CSS, { headers: { 'Content-Type': 'text/css' } })) this.get('/css/pico.css', async c => new Response(PICO_CSS, { headers: { 'Content-Type': 'text/css' } }))
// serve transpiled js // 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('..', '.') let path = './src/' + c.req.path.replace('..', '.')
// path must end in .js or .ts // path must end in .js or .ts

View File

@ -11,7 +11,7 @@ const Layout: FC = ({ children, title, props }) =>
{props.reset && <link href="/css/reset.css" rel="stylesheet" />} {props.reset && <link href="/css/reset.css" rel="stylesheet" />}
{props.pico && <link href="/css/pico.css" rel="stylesheet" />} {props.pico && <link href="/css/pico.css" rel="stylesheet" />}
<link href="/css/main.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> </head>
<body> <body>
<main> <main>