Skip to content

Commit

Permalink
list available templates on wrong name in create
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Feb 12, 2025
1 parent 33b4b53 commit bb650fd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/nuekit/src/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ export async function create(args = {}) {

const { debug, name, root } = args

// currently only simple-blog is available
if (!Object.keys(templates).includes(name)) return console.error(`Template "${name}" does not exist`)
// check if template exists
if (!Object.keys(templates).includes(name)){
console.error(`Template "${name}" does not exist!`)
console.error('Available templates:')
for (const t of Object.keys(templates)) console.error(' -', t)
return
}

if (existsSync(root)) {
// read files
Expand Down

0 comments on commit bb650fd

Please sign in to comment.