Compare commits

...

6 Commits

Author SHA1 Message Date
e243e17acb 1.0.103 2022-05-02 18:23:37 +02:00
d788bdc78b fix(core): update 2022-05-02 18:23:36 +02:00
3ef8a145a5 1.0.102 2022-03-25 19:48:58 +01:00
3377554969 fix(core): update 2022-03-25 19:48:58 +01:00
c53d9023fe 1.0.101 2022-03-18 16:16:20 +01:00
1112cfe793 fix(core): update 2022-03-18 16:16:20 +01:00
5 changed files with 18 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@gitzone/tsbundle",
"version": "1.0.100",
"version": "1.0.103",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@gitzone/tsbundle",
"version": "1.0.100",
"version": "1.0.103",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.17.7",

View File

@ -1,6 +1,6 @@
{
"name": "@gitzone/tsbundle",
"version": "1.0.100",
"version": "1.0.103",
"private": false,
"description": "a bundler using rollup for painless bundling of web projects",
"main": "dist_ts/index.js",
@ -45,7 +45,7 @@
"@rollup/plugin-typescript": "^8.3.1",
"@types/html-minifier": "^4.0.2",
"@types/node": "^17.0.21",
"esbuild": "^0.14.27",
"esbuild": "0.14.27",
"html-minifier": "^4.0.0",
"rollup": "^2.70.1",
"rollup-plugin-babel": "^4.4.0",

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@gitzone/tsbundle',
version: '1.0.103',
description: 'a bundler using rollup for painless bundling of web projects'
}

View File

@ -22,6 +22,7 @@ export class TsBundleProcess {
bundle: true,
sourcemap: true,
format: 'esm',
target: 'es2020',
outfile: toArg
});
}
@ -43,6 +44,7 @@ export class TsBundleProcess {
bundle: true,
sourcemap: true,
format: 'esm',
target: 'es2020',
minify: true,
outfile: toArg
});

View File

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