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"
This commit is contained in:
duncanhealy 2021-04-29 23:41:51 +01:00 committed by GitHub
parent 03775f7048
commit 2a23e7e292
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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...'));