diff options
author | 2021-04-29 23:41:51 +0100 | |
---|---|---|
committer | 2021-04-29 23:41:51 +0100 | |
commit | 2a23e7e292efbe53be2c8b3ada0bfd2e57bfd0ba (patch) | |
tree | d4846e44f880a0000a7d356e926a30950a891776 /src | |
parent | 03775f7048dbab196dfb2de4ac7e63c3fe1b173a (diff) | |
download | astro-2a23e7e292efbe53be2c8b3ada0bfd2e57bfd0ba.tar.gz astro-2a23e7e292efbe53be2c8b3ada0bfd2e57bfd0ba.tar.zst astro-2a23e7e292efbe53be2c8b3ada0bfd2e57bfd0ba.zip |
build: add warning if no public folder found #96 (#144)
* build: add warning if no public folder found #96
* build: change color to yellow
* build: warn if public folder missing and not set to "public"
Diffstat (limited to 'src')
-rw-r--r-- | src/build.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/build.ts b/src/build.ts index db30b70d2..392b0a920 100644 --- a/src/build.ts +++ b/src/build.ts @@ -274,8 +274,11 @@ export async function build(astroConfig: AstroConfig): Promise<0 | 1> { await writeFilep(outUrl, bytes, null); } info(logging, 'build', green('✔'), 'public folder copied.'); + } else { + if(path.basename(astroConfig.public.toString()) !=='public'){ + info(logging, 'tip', yellow(`! no public folder ${astroConfig.public} found...`)); + } } - // build sitemap if (astroConfig.buildOptions.sitemap && astroConfig.buildOptions.site) { info(logging, 'build', yellow('! creating a sitemap...')); |