src/js/ => src/client/
This commit is contained in:
parent
714d162c63
commit
e938d15dc6
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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