Compare commits

...

11 Commits

5 changed files with 2156 additions and 1590 deletions

View File

@ -1,5 +1,27 @@
# Changelog # 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) ## 2025-01-29 - 2.2.1 - fix(index)
Export mod_assets for programmatic use Export mod_assets for programmatic use

View File

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

View File

@ -8,8 +8,8 @@ export class AssetsHandler {
public async ensureAssetsDir() { public async ensureAssetsDir() {
const assetsDirExists = await plugins.smartfile.fs.isDirectory(this.defaultFromDirPath); const assetsDirExists = await plugins.smartfile.fs.isDirectory(this.defaultFromDirPath);
if (!assetsDirExists) { if (!assetsDirExists) {
console.log(`creating assets directory at ${this.defaultFromDirPath}`);
await plugins.smartfile.fs.ensureDir(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; optionsArg.to = plugins.smartpath.transform.toAbsolute(optionsArg.to, paths.cwd) as string;
// lets clean theh target directory // 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,
});
} }
} }