mk bin/ when mking project

This commit is contained in:
Chris Wanstrath 2025-10-08 13:57:21 -07:00
parent 872a1c3009
commit 090049c08c

View File

@ -13,8 +13,10 @@ export default function (project: string) {
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(dir, { recursive: true }) mkdirSync(join(dir, "bin"), { recursive: true })
writeFileSync(join(dir, `index.ts`), `export default (c: Context) =>\n "Hello, world!"`)
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}`)
load(project) load(project)