From 2a23e7e292efbe53be2c8b3ada0bfd2e57bfd0ba Mon Sep 17 00:00:00 2001 From: duncanhealy Date: Thu, 29 Apr 2021 23:41:51 +0100 Subject: [PATCH] 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" --- src/build.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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...'));