Compare commits

..

15 Commits

7 changed files with 2166 additions and 1592 deletions

View File

@ -1,5 +1,32 @@
# Changelog
## 2025-01-29 - 2.2.5 - fix(mod_assets)
Fix async handling in asset processing
- Ensured that the empty directory operation is awaited in the asset processing workflow.
## 2025-01-29 - 2.2.4 - fix(mod_assets)
Fix logging message in ensureAssetsDir to correctly state when directory is created
- Corrected logging output in ensureAssetsDir method to indicate directory creation.
## 2025-01-29 - 2.2.3 - fix(mod_assets)
Fix issue with asset directory copy
- Updated dependency '@push.rocks/smartfile' to version '^11.2.0'
- Ensure target directory is properly replaced when copying assets
## 2025-01-29 - 2.2.2 - fix(dependencies)
Update smartfile dependency and fix spacing issue in assets module
- Updated @push.rocks/smartfile from ^11.1.6 to ^11.1.8
- Fixed a spacing issue in the processAssets function within the assets module
## 2025-01-29 - 2.2.1 - fix(index)
Export mod_assets for programmatic use
- Added export for mod_assets/index in ts/index.ts to make it usable programmatically.
## 2025-01-29 - 2.2.0 - feat(AssetsHandler)
Add asset handling to the CLI workflow

View File

@ -1,6 +1,6 @@
{
"name": "@git.zone/tsbundle",
"version": "2.2.0",
"version": "2.2.8",
"private": false,
"description": "a bundler using rollup for painless bundling of web projects",
"main": "dist_ts/index.js",
@ -16,26 +16,26 @@
"tsbundle": "cli.js"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.2.1",
"@git.zone/tsbuild": "^2.6.4",
"@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^1.0.96",
"@push.rocks/tapbundle": "^5.5.6",
"@git.zone/tstest": "^2.3.1",
"@push.rocks/tapbundle": "^6.0.3",
"@types/node": "^22.12.0"
},
"dependencies": {
"@push.rocks/early": "^4.0.4",
"@push.rocks/smartcli": "^4.0.11",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartfile": "^11.1.6",
"@push.rocks/smartlog": "^3.0.7",
"@push.rocks/smartfile": "^11.2.5",
"@push.rocks/smartlog": "^3.1.8",
"@push.rocks/smartlog-destination-local": "^9.0.2",
"@push.rocks/smartpath": "^5.0.18",
"@push.rocks/smartpromise": "^4.2.2",
"@push.rocks/smartpromise": "^4.2.3",
"@push.rocks/smartspawn": "^3.0.3",
"@types/html-minifier": "^4.0.5",
"esbuild": "^0.24.2",
"esbuild": "^0.25.5",
"html-minifier": "^4.0.0",
"typescript": "5.7.3"
"typescript": "5.8.3"
},
"files": [
"ts/**/*",
@ -51,5 +51,6 @@
],
"browserslist": [
"last 1 chrome versions"
]
],
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
}

3693
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tsbundle',
version: '2.2.0',
version: '2.2.5',
description: 'a bundler using rollup for painless bundling of web projects'
}

View File

@ -9,5 +9,6 @@ early.stop();
// lets make this usable programmatically
export * from './tsbundle.class.tsbundle.js';
export * from './mod_assets/index.js';
export * from './mod_html/index.js';
export { runCli };

View File

@ -8,8 +8,8 @@ export class AssetsHandler {
public async ensureAssetsDir() {
const assetsDirExists = await plugins.smartfile.fs.isDirectory(this.defaultFromDirPath);
if (!assetsDirExists) {
console.log(`creating assets directory at ${this.defaultFromDirPath}`);
await plugins.smartfile.fs.ensureDir(this.defaultFromDirPath);
console.log(`created assets directory at ${this.defaultFromDirPath}`);
}
}
@ -31,8 +31,10 @@ export class AssetsHandler {
optionsArg.to = plugins.smartpath.transform.toAbsolute(optionsArg.to, paths.cwd) as string;
// lets clean theh target directory
plugins.smartfile.fs.ensureEmptyDir(optionsArg.to);
await plugins.smartfile.fs.ensureEmptyDir(optionsArg.to);
plugins.smartfile.fs.copySync(optionsArg.from, optionsArg.to);
plugins.smartfile.fs.copySync(optionsArg.from, optionsArg.to, {
replaceTargetDir: true,
});
}
}

View File

@ -39,7 +39,8 @@ export class TsBundleProcess {
target: 'es2022',
entryNames: plugins.path.parse(toArg).name,
outdir: plugins.path.parse(toArg).dir,
// splitting: true,
splitting: false,
treeShaking: false,
tsconfig: paths.tsconfigPath,
alias: await this.getAliases(),
});
@ -63,7 +64,8 @@ export class TsBundleProcess {
entryNames: 'bundle',
outdir: plugins.path.parse(toArg).dir,
tsconfig: paths.tsconfigPath,
// splitting: true,
splitting: false,
treeShaking: false,
chunkNames: 'chunks/[name]-[hash]',
alias: await this.getAliases(),
});