From 694fd867395423f20b0e8604f4031ac6633cf706 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 31 Jan 2024 14:40:19 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/@types/astro.ts | 2 +- packages/astro/src/core/build/common.ts | 4 ++-- packages/astro/test/astro-pageDirectoryUrl.test.js | 4 ++-- packages/astro/test/page-format.test.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index bc0ab1e3ea..38675898fc 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -790,7 +790,7 @@ export interface AstroUserConfig { * Control the output file format of each page. This value may be set by an adapter for you. * - `'file'`: Astro will generate an HTML file named for each page route. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about.html`) * - `'directory'`: Astro will generate a directory with a nested `index.html` file for each page. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about/index.html`) - * - `'preserve'`: Astro will generate HTML files exactly as they appear in your source folder. (e.g. `src/pages/about.astro` builds `/about.html` and `src/pages/about/index.astro` builds the file `/about/index.html`) + * - `'preserve'`: Astro will generate HTML files exactly as they appear in your source folder. (e.g. `src/pages/about.astro` builds `/about.html` and `src/pages/about/index.astro` builds the file `/about/index.html`) * * ```js * { diff --git a/packages/astro/src/core/build/common.ts b/packages/astro/src/core/build/common.ts index daa719a3e0..badfa561e5 100644 --- a/packages/astro/src/core/build/common.ts +++ b/packages/astro/src/core/build/common.ts @@ -44,7 +44,7 @@ export function getOutFolder( let dir; // If the pathname is '' then this is the root index.html // If this is an index route, the folder should be the pathname, not the parent - if(pathname === '' || routeData.isIndex) { + if (pathname === '' || routeData.isIndex) { dir = pathname; } else { dir = npath.dirname(pathname); @@ -84,7 +84,7 @@ export function getOutFile( let baseName = npath.basename(pathname); // If there is no base name this is the root route. // If this is an index route, the name should be `index.html`. - if(!baseName || routeData.isIndex) { + if (!baseName || routeData.isIndex) { baseName = 'index'; } return new URL(`./${baseName}.html`, outFolder); diff --git a/packages/astro/test/astro-pageDirectoryUrl.test.js b/packages/astro/test/astro-pageDirectoryUrl.test.js index 19b75e2229..43e1b8cb52 100644 --- a/packages/astro/test/astro-pageDirectoryUrl.test.js +++ b/packages/astro/test/astro-pageDirectoryUrl.test.js @@ -15,7 +15,7 @@ describe('build format', () => { }); await fixture.build(); }); - + it('outputs', async () => { expect(await fixture.readFile('/client.html')).to.be.ok; expect(await fixture.readFile('/nested-md.html')).to.be.ok; @@ -36,7 +36,7 @@ describe('build format', () => { }); await fixture.build(); }); - + it('outputs', async () => { expect(await fixture.readFile('/client.html')).to.be.ok; expect(await fixture.readFile('/nested-md/index.html')).to.be.ok; diff --git a/packages/astro/test/page-format.test.js b/packages/astro/test/page-format.test.js index 63e5dae833..7fd68a6171 100644 --- a/packages/astro/test/page-format.test.js +++ b/packages/astro/test/page-format.test.js @@ -67,8 +67,8 @@ describe('build.format', () => { routing: { prefixDefaultLocale: true, redirectToDefaultLocale: true, - } - } + }, + }, }); });