fix create-astro template issue (#334)
This commit is contained in:
parent
91ce5383a9
commit
d6a7349e74
3 changed files with 7 additions and 2 deletions
5
.changeset/polite-coats-study.md
Normal file
5
.changeset/polite-coats-study.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
fix issue with empty prompt
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
export const TEMPLATES = [
|
||||
,
|
||||
{
|
||||
title: 'Starter Kit (Generic)',
|
||||
value: 'starter',
|
||||
|
|
Loading…
Reference in a new issue