I guess put tsconfig EVERYWHERE

This commit is contained in:
Chris Wanstrath 2025-10-23 13:46:39 -07:00
parent 3d19a34dd5
commit af2c8b8f4e

View File

@ -8,15 +8,16 @@ import { NOSE_DIR } from "@/config"
import load from "./load"
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`
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)