Compare commits

..

No commits in common. "af2c8b8f4e17087b624db09be5c23887fb3bd8e6" and "84b001e651f13a8a7bc3febb6a23f6997e6d8dd8" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -8,16 +8,15 @@ import { NOSE_DIR } from "@/config"
import load from "./load"
export default function (project: string) {
if (!project) throw "usage: mkproject <project name>"
if (!project) throw "usage: new <project name>"
if (projects().includes(project)) throw `${project} already exists`
const dir = join(NOSE_DIR, project)
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, "tsconfig.json"), `{ "extends": "../tsconfig.json", "include": ["./**/*"] }`)
load(project)

View File

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