summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <ematipico@users.noreply.github.com> 2024-01-31 14:40:19 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2024-01-31 14:40:19 +0000
commit694fd867395423f20b0e8604f4031ac6633cf706 (patch)
tree6a264913378439dbb6834a4add35961e8fcf5fee
parentfad4f64aa149086feda2d1f3a0b655767034f1a8 (diff)
downloadastro-694fd867395423f20b0e8604f4031ac6633cf706.tar.gz
astro-694fd867395423f20b0e8604f4031ac6633cf706.tar.zst
astro-694fd867395423f20b0e8604f4031ac6633cf706.zip
[ci] format
-rw-r--r--packages/astro/src/@types/astro.ts2
-rw-r--r--packages/astro/src/core/build/common.ts4
-rw-r--r--packages/astro/test/astro-pageDirectoryUrl.test.js4
-rw-r--r--packages/astro/test/page-format.test.js4
4 files changed, 7 insertions, 7 deletions
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index bc0ab1e3e..38675898f 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 daa719a3e..badfa561e 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 19b75e222..43e1b8cb5 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 63e5dae83..7fd68a617 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,
- }
- }
+ },
+ },
});
});