summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/create-astro/src/actions/template.ts8
-rw-r--r--packages/create-astro/test/template.test.js10
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts
index eaebe2360..8d22e95b1 100644
--- a/packages/create-astro/src/actions/template.ts
+++ b/packages/create-astro/src/actions/template.ts
@@ -9,11 +9,11 @@ import { error, info, spinner, title } from '../messages.js';
export async function template(
ctx: Pick<Context, 'template' | 'prompt' | 'yes' | 'dryRun' | 'exit'>
) {
- if (!ctx.template && ctx.yes) ctx.template = 'basics';
+ if (!ctx.template && ctx.yes) ctx.template = 'basics';
- if (ctx.template) {
- await info('tmpl', `Using ${color.reset(ctx.template)}${color.dim(' as project template')}`);
- } else {
+ if (ctx.template) {
+ await info('tmpl', `Using ${color.reset(ctx.template)}${color.dim(' as project template')}`);
+ } else {
const { template: tmpl } = await ctx.prompt({
name: 'template',
type: 'select',
diff --git a/packages/create-astro/test/template.test.js b/packages/create-astro/test/template.test.js
index cf6b45f77..aef7e1944 100644
--- a/packages/create-astro/test/template.test.js
+++ b/packages/create-astro/test/template.test.js
@@ -34,10 +34,10 @@ describe('template', () => {
expect(fixture.hasMessage('Using blog as project template')).to.be.true;
});
- it('minimal (--yes)', async () => {
- const context = { template: 'minimal', cwd: '', dryRun: true, yes: true, prompt: () => {} };
- await template(context);
+ it('minimal (--yes)', async () => {
+ const context = { template: 'minimal', cwd: '', dryRun: true, yes: true, prompt: () => {} };
+ await template(context);
- expect(fixture.hasMessage('Using minimal as project template')).to.be.true;
- })
+ expect(fixture.hasMessage('Using minimal as project template')).to.be.true;
+ });
});
b1cbc8bf76455efa96ab591d6293aa8a43964&follow=1'>[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03Append to list of HMR modules, don't override (#2532)Gravatar Matthew Phillips 2-1/+6 2022-02-03add back dev server host support (#2531)Gravatar Fred K. Schott 2-1/+14 2022-02-03simplify status code regexGravatar Fred K. Schott 2-87/+4 2022-02-03Adding StackUp Digital to the list of sponsors (#2521)Gravatar Astroalex 3-0/+10 2022-02-03[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03[ci] yarn formatGravatar FredKSchott 2-3/+85 2022-02-02Handles all http error code file names the same as 404 files. (#2525)Gravatar Zade Viggers 2-4/+7 2022-02-02fix(sitemap): remove debug if sitemap disabled (#2514)Gravatar Mark Pinero 1-2/+2 2022-02-02[ci] update lockfile (#2515)Gravatar Fred K. Schott 1-276/+279 2022-02-02[ci] yarn formatGravatar matthewp 1-8/+8 2022-02-02[ci] release (next) (#2523)astro@0.23.0-next.1Gravatar github-actions[bot] 28-34/+41 2022-02-02[ci] yarn formatGravatar matthewp 2-17/+29 2022-02-02Fix support for scss in static build (#2522)Gravatar Matthew Phillips 6-20/+114 2022-02-02[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-01[ci] yarn formatGravatar matthewp 2-12/+12 2022-02-01[ci] release (next) (#2492)astro@0.23.0-next.0@astrojs/test-static-build-pkg@0.0.2@astrojs/markdown-remark@0.6.1-next.0Gravatar github-actions[bot] 31-43/+93 2022-02-01[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-31update congratsbot format againGravatar Fred K. Schott 1-1/+1 2022-01-31update congratsbot againGravatar Fred K. Schott 1-1/+1 2022-01-31Remove SVG animation on GitHub/NPM (#2512)Gravatar Nate Moore 1-21/+0 2022-01-31[ci] yarn formatGravatar natemoo-re 2-4/+6 2022-01-31Add Shiki as an alternative to Prism (#2497)Gravatar Juan Martín Seery 26-9/+356 2022-01-31Deprecate unescaped HTML inside of expressions (#2489)Gravatar Nate Moore 9-31/+74