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)));
}
/**
* 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.
*
@ -69,6 +81,7 @@ export function Build(): Promise<void>
JavaScript,
Styles,
Assets,
Icon,
WebPages
])(
(error) =>
@ -159,6 +172,12 @@ export let Watch: TaskFunction = async (): Promise<void> =>
Assets,
BrowserSync(syncer, join(context.AssetDirName, "**", "*"))));
watch(
context.SourcePath("favicon.ico"),
series(
Icon,
BrowserSync(syncer, join("favicon.ico"))));
watch(
context.SourcePath("**", "*.html"),
series(

BIN
src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB