Refactor the build-task

This commit is contained in:
Manuel Thalmann 2021-05-11 18:32:34 +00:00
parent ce34b2e9dc
commit 61627c2a6a

View file

@ -194,6 +194,9 @@ function BrowserSync(filePath?: string): TaskFunction
*/
export async function Build(): Promise<void>
{
return new Promise(
(resolve, reject) =>
{
if (settings.Watch)
{
log.info(watchStartMessage);
@ -213,12 +216,19 @@ export async function Build(): Promise<void>
gulp.watch(settings.TemplateSource("**"), { usePolling: true }, gulp.series(Templates, BrowserSync()));
}
await Promise.all(
[
Library(),
Theme(),
Templates()
]);
gulp.parallel(Library, Theme, Templates)(
(error) =>
{
if (error)
{
reject(error);
}
else
{
resolve();
}
});
});
}
/**