Compare commits

..

2 Commits

Author SHA1 Message Date
Chris Wanstrath
af2c8b8f4e I guess put tsconfig EVERYWHERE 2025-10-23 13:46:39 -07:00
Chris Wanstrath
3d19a34dd5 webapp: Export some Hono types 2025-10-23 13:40:25 -07:00
2 changed files with 6 additions and 2 deletions

View File

@ -8,15 +8,16 @@ import { NOSE_DIR } from "@/config"
import load from "./load" import load from "./load"
export default function (project: string) { export default function (project: string) {
if (!project) throw "usage: new <project name>" if (!project) throw "usage: mkproject <project name>"
if (projects().includes(project)) throw `${project} already exists` if (projects().includes(project)) throw `${project} already exists`
const dir = join(NOSE_DIR, project) const dir = join(NOSE_DIR, project)
mkdirSync(join(dir, "bin"), { recursive: true }) mkdirSync(join(dir, "bin"), { recursive: true })
writeFileSync(join(dir, `index.tsx`), `export default (c: Context) =>\n "Hello from the ${project} project!"`) writeFileSync(join(dir, "index.tsx"), `export default (c: Context) =>\n "Hello from the ${project} project!"`)
writeFileSync(join(dir, "bin", `${project}.ts`), `export default function() {\n return "The ${project} project lives!"\n}`) writeFileSync(join(dir, "bin", `${project}.ts`), `export default function() {\n return "The ${project} project lives!"\n}`)
writeFileSync(join(dir, "tsconfig.json"), `{ "extends": "../tsconfig.json", "include": ["./**/*"] }`)
load(project) load(project)

View File

@ -1 +1,4 @@
export type { Context } from "hono"
export type { FC as Component } from "hono/jsx"
export { routes, css, js } from "./helpers" export { routes, css, js } from "./helpers"