mk bin/ when mking project
This commit is contained in:
parent
872a1c3009
commit
090049c08c
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user