From d6a7349e7437a4c7641fb7f312e91a13ba054a00 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 8 Jun 2021 09:56:37 -0700 Subject: [PATCH] fix create-astro template issue (#334) --- .changeset/polite-coats-study.md | 5 +++++ packages/create-astro/src/index.ts | 3 ++- packages/create-astro/src/templates.ts | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/polite-coats-study.md diff --git a/.changeset/polite-coats-study.md b/.changeset/polite-coats-study.md new file mode 100644 index 000000000..5a44b2a5f --- /dev/null +++ b/.changeset/polite-coats-study.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +fix issue with empty prompt diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index c42a1942c..0d1d834f3 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -4,7 +4,7 @@ import { bold, cyan, gray, green, red } from 'kleur/colors'; import prompts from 'prompts'; import degit from 'degit'; import yargs from 'yargs-parser'; -import { TEMPLATES } from './templates'; +import { TEMPLATES } from './templates.js'; const args = yargs(process.argv); prompts.override(args); @@ -60,6 +60,7 @@ export async function main() { try { // emitter.on('info', info => { console.log(info.message) }); + console.log(green(`>`) + gray(` Copying project files...`)); await emitter.clone(cwd); } catch (err) { // degit is compiled, so the stacktrace is pretty noisy. Just report the message. diff --git a/packages/create-astro/src/templates.ts b/packages/create-astro/src/templates.ts index dce085314..02daaef32 100644 --- a/packages/create-astro/src/templates.ts +++ b/packages/create-astro/src/templates.ts @@ -1,5 +1,4 @@ export const TEMPLATES = [ - , { title: 'Starter Kit (Generic)', value: 'starter',