summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2022-01-31 21:30:29 +0000
committerGravatar GitHub Actions <actions@github.com> 2022-01-31 21:30:29 +0000
commitde9ab4f30664b51ce3a65d75125eb73c7aa05925 (patch)
tree8f74d9171a533f5b3fb6b35ac82f29f933b63d86 /packages
parentd8b50c9e689774b410916b8aa5a605958ba0782e (diff)
downloadastro-de9ab4f30664b51ce3a65d75125eb73c7aa05925.tar.gz
astro-de9ab4f30664b51ce3a65d75125eb73c7aa05925.tar.zst
astro-de9ab4f30664b51ce3a65d75125eb73c7aa05925.zip
[ci] yarn format
Diffstat (limited to 'packages')
-rw-r--r--packages/astro/src/core/build/static-build.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts
index 2ff7443a5..cbbabfa7b 100644
--- a/packages/astro/src/core/build/static-build.ts
+++ b/packages/astro/src/core/build/static-build.ts
@@ -224,7 +224,7 @@ async function clientBuild(opts: StaticBuildOptions, internals: BuildInternals,
root: viteConfig.root,
envPrefix: 'PUBLIC_',
server: viteConfig.server,
- base: appendForwardSlash(astroConfig.buildOptions.site ? (new URL(astroConfig.buildOptions.site)).pathname : '/'),
+ base: appendForwardSlash(astroConfig.buildOptions.site ? new URL(astroConfig.buildOptions.site).pathname : '/'),
});
}
@@ -383,8 +383,7 @@ async function generatePath(pathname: string, opts: StaticBuildOptions, gopts: G
}
function getOutRoot(astroConfig: AstroConfig): URL {
- const rootPathname = appendForwardSlash(astroConfig.buildOptions.site ?
- new URL(astroConfig.buildOptions.site).pathname : '/');
+ const rootPathname = appendForwardSlash(astroConfig.buildOptions.site ? new URL(astroConfig.buildOptions.site).pathname : '/');
return new URL('.' + rootPathname, astroConfig.dist);
}
@@ -392,16 +391,20 @@ function getOutFolder(astroConfig: AstroConfig, pathname: string): URL {
const outRoot = getOutRoot(astroConfig);
// This is the root folder to write to.
- switch(astroConfig.buildOptions.pageUrlFormat) {
- case 'directory': return new URL('.' + appendForwardSlash(pathname), outRoot);
- case 'file': return outRoot;
+ switch (astroConfig.buildOptions.pageUrlFormat) {
+ case 'directory':
+ return new URL('.' + appendForwardSlash(pathname), outRoot);
+ case 'file':
+ return outRoot;
}
}
function getOutFile(astroConfig: AstroConfig, outFolder: URL, pathname: string): URL {
- switch(astroConfig.buildOptions.pageUrlFormat) {
- case 'directory': return new URL('./index.html', outFolder);
- case 'file': return new URL('.' + pathname + '.html', outFolder);
+ switch (astroConfig.buildOptions.pageUrlFormat) {
+ case 'directory':
+ return new URL('./index.html', outFolder);
+ case 'file':
+ return new URL('.' + pathname + '.html', outFolder);
}
}