Add a favicon

This commit is contained in:
Manuel Thalmann 2022-12-23 18:28:42 +01:00
parent b17363b9e8
commit 3a62c8902f
2 changed files with 19 additions and 0 deletions

View file

@ -44,6 +44,18 @@ export function Assets(): NodeJS.ReadWriteStream
dest(context.StaticPath(context.AssetDirName))); dest(context.StaticPath(context.AssetDirName)));
} }
/**
* Builds the icon of the webpage.
*
* @returns
* The resulting stream.
*/
export function Icon(): NodeJS.ReadWriteStream
{
return src(context.SourcePath("favicon.ico")).pipe(
dest(context.StaticPath()));
}
/** /**
* Builds the web pages. * Builds the web pages.
* *
@ -69,6 +81,7 @@ export function Build(): Promise<void>
JavaScript, JavaScript,
Styles, Styles,
Assets, Assets,
Icon,
WebPages WebPages
])( ])(
(error) => (error) =>
@ -159,6 +172,12 @@ export let Watch: TaskFunction = async (): Promise<void> =>
Assets, Assets,
BrowserSync(syncer, join(context.AssetDirName, "**", "*")))); BrowserSync(syncer, join(context.AssetDirName, "**", "*"))));
watch(
context.SourcePath("favicon.ico"),
series(
Icon,
BrowserSync(syncer, join("favicon.ico"))));
watch( watch(
context.SourcePath("**", "*.html"), context.SourcePath("**", "*.html"),
series( series(

BIN
src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB