Compare commits
No commits in common. "master" and "v2.1.1" have entirely different histories.
33
changelog.md
33
changelog.md
@ -1,38 +1,5 @@
|
|||||||
# 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)
|
|
||||||
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
|
|
||||||
|
|
||||||
- Introduced AssetsHandler class for managing asset directories and files.
|
|
||||||
- Updated tsbundle.cli.ts to include asset processing in the 'website' command.
|
|
||||||
|
|
||||||
## 2025-01-28 - 2.1.1 - fix(core)
|
## 2025-01-28 - 2.1.1 - fix(core)
|
||||||
Update dependencies and remove GitLab CI configuration.
|
Update dependencies and remove GitLab CI configuration.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tsbundle",
|
"name": "@git.zone/tsbundle",
|
||||||
"version": "2.2.5",
|
"version": "2.1.1",
|
||||||
"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",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
"@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.2.0",
|
"@push.rocks/smartfile": "^11.1.5",
|
||||||
"@push.rocks/smartlog": "^3.0.7",
|
"@push.rocks/smartlog": "^3.0.7",
|
||||||
"@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",
|
||||||
|
32
pnpm-lock.yaml
generated
32
pnpm-lock.yaml
generated
@ -18,8 +18,8 @@ importers:
|
|||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.0.5
|
version: 3.0.5
|
||||||
'@push.rocks/smartfile':
|
'@push.rocks/smartfile':
|
||||||
specifier: ^11.2.0
|
specifier: ^11.1.5
|
||||||
version: 11.2.0
|
version: 11.1.5
|
||||||
'@push.rocks/smartlog':
|
'@push.rocks/smartlog':
|
||||||
specifier: ^3.0.7
|
specifier: ^3.0.7
|
||||||
version: 3.0.7
|
version: 3.0.7
|
||||||
@ -777,8 +777,8 @@ packages:
|
|||||||
'@push.rocks/smartfile@10.0.41':
|
'@push.rocks/smartfile@10.0.41':
|
||||||
resolution: {integrity: sha512-xOOy0duI34M2qrJZggpk51EHGXmg9+mBL1Q55tNiQKXzfx89P3coY1EAZG8tvmep3qB712QEKe7T+u04t42Kjg==}
|
resolution: {integrity: sha512-xOOy0duI34M2qrJZggpk51EHGXmg9+mBL1Q55tNiQKXzfx89P3coY1EAZG8tvmep3qB712QEKe7T+u04t42Kjg==}
|
||||||
|
|
||||||
'@push.rocks/smartfile@11.2.0':
|
'@push.rocks/smartfile@11.1.5':
|
||||||
resolution: {integrity: sha512-0Gw6DvCQ2D/BXNN6airSC7hoSBut0p/uNWf2+rqO+D6VLhIJ/QUBvF6xm/LnpPI/zcF8YlDn/GEriInB5DUtEw==}
|
resolution: {integrity: sha512-N+f7P4MqgkDiPR5CrvzMJF9JVtXQK1Di24cYAd8roFkDVpnILlLQOQql558FPm2QE+HtDLuPLPBu2uaSZRLReA==}
|
||||||
|
|
||||||
'@push.rocks/smartguard@3.1.0':
|
'@push.rocks/smartguard@3.1.0':
|
||||||
resolution: {integrity: sha512-J23q84f1O+TwFGmd4lrO9XLHUh2DaLXo9PN/9VmTWYzTkQDv5JehmifXVI0esophXcCIfbdIu6hbt7/aHlDF4A==}
|
resolution: {integrity: sha512-J23q84f1O+TwFGmd4lrO9XLHUh2DaLXo9PN/9VmTWYzTkQDv5JehmifXVI0esophXcCIfbdIu6hbt7/aHlDF4A==}
|
||||||
@ -4236,7 +4236,7 @@ snapshots:
|
|||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartenv': 5.0.12
|
'@push.rocks/smartenv': 5.0.12
|
||||||
'@push.rocks/smartfeed': 1.0.11
|
'@push.rocks/smartfeed': 1.0.11
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartjson': 5.0.20
|
'@push.rocks/smartjson': 5.0.20
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartlog-destination-devtools': 1.0.12
|
'@push.rocks/smartlog-destination-devtools': 1.0.12
|
||||||
@ -5041,7 +5041,7 @@ snapshots:
|
|||||||
'@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.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
'@push.rocks/smartpromise': 4.2.2
|
'@push.rocks/smartpromise': 4.2.2
|
||||||
@ -5054,7 +5054,7 @@ snapshots:
|
|||||||
'@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.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@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
|
||||||
@ -5071,7 +5071,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@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.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartnpm': 2.0.4
|
'@push.rocks/smartnpm': 2.0.4
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
@ -5082,7 +5082,7 @@ snapshots:
|
|||||||
|
|
||||||
'@git.zone/tsrun@1.3.3':
|
'@git.zone/tsrun@1.3.3':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartshell': 3.2.2
|
'@push.rocks/smartshell': 3.2.2
|
||||||
tsx: 4.19.2
|
tsx: 4.19.2
|
||||||
|
|
||||||
@ -5094,7 +5094,7 @@ snapshots:
|
|||||||
'@push.rocks/consolecolor': 2.0.2
|
'@push.rocks/consolecolor': 2.0.2
|
||||||
'@push.rocks/smartbrowser': 2.0.8
|
'@push.rocks/smartbrowser': 2.0.8
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartpromise': 4.2.2
|
'@push.rocks/smartpromise': 4.2.2
|
||||||
'@push.rocks/smartshell': 3.2.2
|
'@push.rocks/smartshell': 3.2.2
|
||||||
@ -5286,7 +5286,7 @@ snapshots:
|
|||||||
'@push.rocks/smartcache': 1.0.16
|
'@push.rocks/smartcache': 1.0.16
|
||||||
'@push.rocks/smartenv': 5.0.12
|
'@push.rocks/smartenv': 5.0.12
|
||||||
'@push.rocks/smartexit': 1.0.23
|
'@push.rocks/smartexit': 1.0.23
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartjson': 5.0.20
|
'@push.rocks/smartjson': 5.0.20
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
'@push.rocks/smartpromise': 4.2.2
|
'@push.rocks/smartpromise': 4.2.2
|
||||||
@ -5324,7 +5324,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest': 3.1.10
|
'@api.global/typedrequest': 3.1.10
|
||||||
'@configvault.io/interfaces': 1.0.17
|
'@configvault.io/interfaces': 1.0.17
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartlog': 3.0.7
|
'@push.rocks/smartlog': 3.0.7
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
|
|
||||||
@ -5476,7 +5476,7 @@ snapshots:
|
|||||||
glob: 10.4.5
|
glob: 10.4.5
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
|
|
||||||
'@push.rocks/smartfile@11.2.0':
|
'@push.rocks/smartfile@11.1.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/lik': 6.1.0
|
'@push.rocks/lik': 6.1.0
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
@ -5633,7 +5633,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartbuffer': 3.0.4
|
'@push.rocks/smartbuffer': 3.0.4
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartnetwork': 3.0.2
|
'@push.rocks/smartnetwork': 3.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.2
|
||||||
@ -5686,7 +5686,7 @@ snapshots:
|
|||||||
'@push.rocks/smarts3@2.2.5':
|
'@push.rocks/smarts3@2.2.5':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartbucket': 3.3.7
|
'@push.rocks/smartbucket': 3.3.7
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
'@tsclass/tsclass': 4.4.0
|
'@tsclass/tsclass': 4.4.0
|
||||||
'@types/s3rver': 3.7.4
|
'@types/s3rver': 3.7.4
|
||||||
@ -5833,7 +5833,7 @@ snapshots:
|
|||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartenv': 5.0.12
|
'@push.rocks/smartenv': 5.0.12
|
||||||
'@push.rocks/smartexpect': 1.4.0
|
'@push.rocks/smartexpect': 1.4.0
|
||||||
'@push.rocks/smartfile': 11.2.0
|
'@push.rocks/smartfile': 11.1.5
|
||||||
'@push.rocks/smartjson': 5.0.20
|
'@push.rocks/smartjson': 5.0.20
|
||||||
'@push.rocks/smartmongo': 2.0.10(@aws-sdk/credential-providers@3.734.0)(socks@2.8.3)
|
'@push.rocks/smartmongo': 2.0.10(@aws-sdk/credential-providers@3.734.0)(socks@2.8.3)
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tsbundle',
|
name: '@git.zone/tsbundle',
|
||||||
version: '2.2.5',
|
version: '2.1.1',
|
||||||
description: 'a bundler using rollup for painless bundling of web projects'
|
description: 'a bundler using rollup for painless bundling of web projects'
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,5 @@ early.stop();
|
|||||||
|
|
||||||
// lets make this usable programmatically
|
// lets make this usable programmatically
|
||||||
export * from './tsbundle.class.tsbundle.js';
|
export * from './tsbundle.class.tsbundle.js';
|
||||||
export * from './mod_assets/index.js';
|
|
||||||
export * from './mod_html/index.js';
|
export * from './mod_html/index.js';
|
||||||
export { runCli };
|
export { runCli };
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
import * as plugins from './plugins.js';
|
|
||||||
import * as paths from '../paths.js';
|
|
||||||
|
|
||||||
export class AssetsHandler {
|
|
||||||
public defaultFromDirPath: string = plugins.path.join(paths.cwd, './assets');
|
|
||||||
public defaultToDirPath: string = plugins.path.join(paths.cwd, './dist_serve/assets');
|
|
||||||
|
|
||||||
public async ensureAssetsDir() {
|
|
||||||
const assetsDirExists = await plugins.smartfile.fs.isDirectory(this.defaultFromDirPath);
|
|
||||||
if (!assetsDirExists) {
|
|
||||||
await plugins.smartfile.fs.ensureDir(this.defaultFromDirPath);
|
|
||||||
console.log(`created assets directory at ${this.defaultFromDirPath}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// copies the html
|
|
||||||
public async processAssets(optionsArg?: {
|
|
||||||
from?: string;
|
|
||||||
to?: string;
|
|
||||||
}) {
|
|
||||||
// lets assemble the options
|
|
||||||
optionsArg = {
|
|
||||||
... {
|
|
||||||
from: this.defaultFromDirPath,
|
|
||||||
to: this.defaultToDirPath,
|
|
||||||
},
|
|
||||||
...(optionsArg || {})
|
|
||||||
}
|
|
||||||
await this.ensureAssetsDir()
|
|
||||||
optionsArg.from = plugins.smartpath.transform.toAbsolute(optionsArg.from, paths.cwd) as string;
|
|
||||||
optionsArg.to = plugins.smartpath.transform.toAbsolute(optionsArg.to, paths.cwd) as string;
|
|
||||||
|
|
||||||
// lets clean theh target directory
|
|
||||||
await plugins.smartfile.fs.ensureEmptyDir(optionsArg.to);
|
|
||||||
|
|
||||||
plugins.smartfile.fs.copySync(optionsArg.from, optionsArg.to, {
|
|
||||||
replaceTargetDir: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
export * from '../plugins.js';
|
|
@ -2,7 +2,6 @@ import * as plugins from './plugins.js';
|
|||||||
import { TsBundle } from './tsbundle.class.tsbundle.js';
|
import { TsBundle } from './tsbundle.class.tsbundle.js';
|
||||||
import { HtmlHandler } from './mod_html/index.js';
|
import { HtmlHandler } from './mod_html/index.js';
|
||||||
import { logger } from './tsbundle.logging.js';
|
import { logger } from './tsbundle.logging.js';
|
||||||
import { AssetsHandler } from './mod_assets/index.js';
|
|
||||||
|
|
||||||
export const runCli = async () => {
|
export const runCli = async () => {
|
||||||
const tsBundleCli = new plugins.smartcli.Smartcli();
|
const tsBundleCli = new plugins.smartcli.Smartcli();
|
||||||
@ -35,8 +34,6 @@ export const runCli = async () => {
|
|||||||
|
|
||||||
tsBundleCli.addCommand('website').subscribe(async (argvArg) => {
|
tsBundleCli.addCommand('website').subscribe(async (argvArg) => {
|
||||||
const tsbundle = new TsBundle();
|
const tsbundle = new TsBundle();
|
||||||
|
|
||||||
// lets deal with the html
|
|
||||||
const htmlHandler = new HtmlHandler();
|
const htmlHandler = new HtmlHandler();
|
||||||
await tsbundle.build(
|
await tsbundle.build(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
@ -52,10 +49,6 @@ export const runCli = async () => {
|
|||||||
minify: true,
|
minify: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// lets deal with the assets
|
|
||||||
const assetsHandler = new AssetsHandler();
|
|
||||||
await assetsHandler.processAssets();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
tsBundleCli.startParse();
|
tsBundleCli.startParse();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user