fix(core): update
This commit is contained in:
parent
a98471e914
commit
ca6ef86c8c
@ -1,5 +1,5 @@
|
|||||||
# gitzone ci_default
|
# gitzone ci_default
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@ -50,13 +50,13 @@ testLTS:
|
|||||||
- docker
|
- docker
|
||||||
- notpriv
|
- notpriv
|
||||||
|
|
||||||
testSTABLE:
|
testBuild:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci npm prepare
|
||||||
- npmci node install stable
|
- npmci node install lts
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci command npm run build
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -65,7 +65,7 @@ testSTABLE:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci node install lts
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
@ -9,7 +9,7 @@ export const runCli = async () => {
|
|||||||
const tsbundle = new TsBundle();
|
const tsbundle = new TsBundle();
|
||||||
const htmlHandler = new HtmlHandler();
|
const htmlHandler = new HtmlHandler();
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case (argvArg.production) || process.env.CI:
|
case argvArg.production || process.env.CI:
|
||||||
await tsbundle.buildProduction();
|
await tsbundle.buildProduction();
|
||||||
await htmlHandler.minifyHtml();
|
await htmlHandler.minifyHtml();
|
||||||
break;
|
break;
|
||||||
|
@ -5,7 +5,7 @@ export class HtmlHandler {
|
|||||||
public sourceFilePath: string = plugins.path.join(paths.htmlDir, 'index.html');
|
public sourceFilePath: string = plugins.path.join(paths.htmlDir, 'index.html');
|
||||||
public targetFilePath: string = plugins.path.join(paths.distWebDir, '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);
|
return plugins.smartfile.fs.fileExists(this.sourceFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,10 +14,7 @@ export class HtmlHandler {
|
|||||||
if (!(await this.checkIfExists)) {
|
if (!(await this.checkIfExists)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await plugins.smartfile.fs.copy(
|
await plugins.smartfile.fs.copy(this.sourceFilePath, this.targetFilePath);
|
||||||
this.sourceFilePath,
|
|
||||||
this.targetFilePath
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// copies and minifies the html
|
// copies and minifies the html
|
||||||
@ -35,7 +32,6 @@ export class HtmlHandler {
|
|||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
collapseInlineTagWhitespace: true,
|
collapseInlineTagWhitespace: true,
|
||||||
removeComments: true
|
removeComments: true
|
||||||
|
|
||||||
});
|
});
|
||||||
plugins.smartfile.memory.toFsSync(minifiedHtml, this.targetFilePath);
|
plugins.smartfile.memory.toFsSync(minifiedHtml, this.targetFilePath);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
// node native
|
// node native
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export {
|
export { path };
|
||||||
path
|
|
||||||
};
|
|
||||||
|
|
||||||
// pushrocks scope
|
// pushrocks scope
|
||||||
import * as smartcli from '@pushrocks/smartcli';
|
import * as smartcli from '@pushrocks/smartcli';
|
||||||
|
Loading…
Reference in New Issue
Block a user