From 1112cfe793e405ee70b5e13f73ad591222912738 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 18 Mar 2022 16:16:20 +0100 Subject: [PATCH] fix(core): update --- ts/mod_html/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/mod_html/index.ts b/ts/mod_html/index.ts index 76ce7f7..2095d4b 100644 --- a/ts/mod_html/index.ts +++ b/ts/mod_html/index.ts @@ -11,18 +11,18 @@ export class HtmlHandler { // copies the html public async copyHtml(fromArg: string = this.defaultFromPath, toArg: string = this.defaultToPath) { - if (!(await this.checkIfExists())) { + if (await this.checkIfExists()) { console.log(`${fromArg} replaces file at ${toArg}`); } fromArg = plugins.smartpath.transform.toAbsolute(fromArg, paths.cwd) as string; toArg = plugins.smartpath.transform.toAbsolute(toArg, paths.cwd) as string; await plugins.smartfile.fs.copy(fromArg, toArg); - console.log(`html copy replacement succeeded`); + console.log(`html copy succeeded!`); } // copies and minifies the html public async minifyHtml(fromArg: string = this.defaultFromPath, toArg: string = this.defaultToPath) { - if (!(await this.checkIfExists())) { + if (await this.checkIfExists()) { console.log(`${fromArg} replaces file at ${toArg}`); } fromArg = plugins.smartpath.transform.toAbsolute(fromArg, paths.cwd) as string; @@ -39,5 +39,6 @@ export class HtmlHandler { removeComments: true, }); await plugins.smartfile.memory.toFs(minifiedHtml, toArg); + console.log(`html minification succeeded!`); } }