Compare commits

..

2 Commits

Author SHA1 Message Date
ebcf89520a 1.0.31 2019-07-17 12:22:25 +02:00
ca6ef86c8c fix(core): update 2019-07-17 12:22:24 +02:00
6 changed files with 14 additions and 20 deletions

View File

@ -1,5 +1,5 @@
# gitzone ci_default
image: hosttoday/ht-docker-node:npmci
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
@ -49,14 +49,14 @@ testLTS:
tags:
- docker
- notpriv
testSTABLE:
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci node install lts
- npmci npm install
- npmci npm test
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
@ -65,7 +65,7 @@ testSTABLE:
release:
stage: release
script:
- npmci node install stable
- npmci node install lts
- npmci npm publish
only:
- tags

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbundle",
"version": "1.0.30",
"version": "1.0.31",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbundle",
"version": "1.0.30",
"version": "1.0.31",
"private": false,
"description": "a bundler using rollup for painless bundling of web projects",
"main": "dist/index.js",

View File

@ -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;

View File

@ -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);
}
}
}

View File

@ -1,9 +1,7 @@
// node native
import * as path from 'path';
export {
path
};
export { path };
// pushrocks scope
import * as smartcli from '@pushrocks/smartcli';