fix create-astro template issue (#334)

This commit is contained in:
Fred K. Schott 2021-06-08 09:56:37 -07:00 committed by GitHub
parent 91ce5383a9
commit d6a7349e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'create-astro': patch
---
fix issue with empty prompt

View file

@ -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.

View file

@ -1,5 +1,4 @@
export const TEMPLATES = [
,
{
title: 'Starter Kit (Generic)',
value: 'starter',