fix(core): update
This commit is contained in:
@ -9,7 +9,7 @@ export const runCli = async () => {
|
||||
const tsbundle = new TsBundle();
|
||||
const htmlHandler = new HtmlHandler();
|
||||
switch (true) {
|
||||
case (argvArg.production) || process.env.CI:
|
||||
case argvArg.production || process.env.CI:
|
||||
await tsbundle.buildProduction();
|
||||
await htmlHandler.minifyHtml();
|
||||
break;
|
||||
|
@ -5,7 +5,7 @@ export class HtmlHandler {
|
||||
public sourceFilePath: string = plugins.path.join(paths.htmlDir, 'index.html');
|
||||
public targetFilePath: string = plugins.path.join(paths.distWebDir, 'index.html');
|
||||
|
||||
public async checkIfExists () {
|
||||
public async checkIfExists() {
|
||||
return plugins.smartfile.fs.fileExists(this.sourceFilePath);
|
||||
}
|
||||
|
||||
@ -14,10 +14,7 @@ export class HtmlHandler {
|
||||
if (!(await this.checkIfExists)) {
|
||||
return;
|
||||
}
|
||||
await plugins.smartfile.fs.copy(
|
||||
this.sourceFilePath,
|
||||
this.targetFilePath
|
||||
);
|
||||
await plugins.smartfile.fs.copy(this.sourceFilePath, this.targetFilePath);
|
||||
}
|
||||
|
||||
// copies and minifies the html
|
||||
@ -34,9 +31,8 @@ export class HtmlHandler {
|
||||
removeAttributeQuotes: true,
|
||||
collapseWhitespace: true,
|
||||
collapseInlineTagWhitespace: true,
|
||||
removeComments: true
|
||||
|
||||
removeComments: true
|
||||
});
|
||||
plugins.smartfile.memory.toFsSync(minifiedHtml, this.targetFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
|
||||
export {
|
||||
path
|
||||
};
|
||||
export { path };
|
||||
|
||||
// pushrocks scope
|
||||
import * as smartcli from '@pushrocks/smartcli';
|
||||
|
Reference in New Issue
Block a user