Compare commits

...

23 Commits

Author SHA1 Message Date
889643e233 1.0.80 2022-04-22 01:36:11 +02:00
1d3a2dcb64 fix(core): update 2022-04-22 01:36:11 +02:00
9688e3323d 1.0.79 2022-04-22 00:31:21 +02:00
6fa56e9be6 fix(core): update 2022-04-22 00:31:20 +02:00
15e9df5f4f 1.0.78 2022-04-21 23:41:45 +02:00
e0f8503b2b fix(core): update 2022-04-21 23:41:45 +02:00
1337a6ec25 1.0.77 2022-04-21 23:36:16 +02:00
bd36e3edf3 fix(core): update 2022-04-21 23:36:15 +02:00
89fae2edc9 1.0.76 2022-03-31 12:29:59 +02:00
82b09ad253 fix(core): update 2022-03-31 12:29:58 +02:00
57ce71cda3 1.0.75 2022-03-25 19:58:11 +01:00
b171a14c0a fix(core): update 2022-03-25 19:58:11 +01:00
63e0d7fe9e 1.0.74 2022-03-22 23:13:23 +01:00
e2bc505c41 1.0.73 2022-03-18 20:54:12 +01:00
af82480644 fix(core): update 2022-03-18 20:54:12 +01:00
27a08f11b7 1.0.72 2022-03-18 20:32:27 +01:00
073f978626 fix(core): update 2022-03-18 20:32:26 +01:00
8d7ab769e1 1.0.71 2022-03-18 20:32:00 +01:00
8ebc438e2d fix(core): update 2022-03-18 20:31:59 +01:00
d0d158ee87 1.0.70 2022-03-18 20:20:07 +01:00
3ada286495 fix(core): update 2022-03-18 20:20:07 +01:00
0514a74a07 1.0.69 2022-03-18 20:16:58 +01:00
587d08239a fix(core): update 2022-03-18 20:16:58 +01:00
4 changed files with 852 additions and 586 deletions

File diff suppressed because one or more lines are too long

1360
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tswatch", "name": "@gitzone/tswatch",
"version": "1.0.68", "version": "1.0.80",
"private": false, "private": false,
"description": "watch typescript projects during development", "description": "watch typescript projects during development",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@@ -13,27 +13,27 @@
}, },
"scripts": { "scripts": {
"test": "(tstest test/ --web)", "test": "(tstest test/ --web)",
"build": "(tsbuild --web --skiplibcheck --allowimplicitany)" "build": "(tsbuild --web --allowimplicitany)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.59", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tstest": "^1.0.69", "@gitzone/tstest": "^1.0.70",
"@pushrocks/tapbundle": "^5.0.2", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.21" "@types/node": "^17.0.25"
}, },
"dependencies": { "dependencies": {
"@gitzone/tsbundle": "^1.0.100", "@gitzone/tsbundle": "^1.0.102",
"@gitzone/tsrun": "^1.2.31", "@gitzone/tsrun": "^1.2.32",
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^4.0.2",
"@pushrocks/lik": "^5.0.4", "@pushrocks/lik": "^5.0.4",
"@pushrocks/smartchok": "^1.0.23", "@pushrocks/smartchok": "^1.0.23",
"@pushrocks/smartcli": "^3.0.14", "@pushrocks/smartcli": "^3.0.14",
"@pushrocks/smartdelay": "^2.0.13", "@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartlog": "^2.0.44", "@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartlog-destination-local": "^8.0.8", "@pushrocks/smartlog-destination-local": "^8.0.8",
"@pushrocks/smartserve": "^2.0.2", "@pushrocks/smartserve": "^2.0.23",
"@pushrocks/smartshell": "^2.0.30", "@pushrocks/smartshell": "^2.0.30",
"@pushrocks/taskbuffer": "^2.1.17" "@pushrocks/taskbuffer": "^3.0.1"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@@ -17,6 +17,8 @@ export class TsWatch {
* starts the TsWatch instance * starts the TsWatch instance
*/ */
public async start() { public async start() {
const tsbundle = new plugins.tsbundle.TsBundle();
const htmlHandler = new plugins.tsbundle.HtmlHandler();
switch (this.watchmode) { switch (this.watchmode) {
case 'test': case 'test':
this.watcherMap.add( this.watcherMap.add(
@@ -46,9 +48,8 @@ export class TsWatch {
serveDir: plugins.path.join(paths.cwd, './dist_watch/'), serveDir: plugins.path.join(paths.cwd, './dist_watch/'),
port: 3002, port: 3002,
}); });
const tsbundle = new plugins.tsbundle.TsBundle();
const htmlHandler = new plugins.tsbundle.HtmlHandler(); const bundleAndReloadElement = async () => {
const bundleAndReload = async () => {
await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', { await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', {
bundler: 'esbuild' bundler: 'esbuild'
}); });
@@ -58,7 +59,7 @@ export class TsWatch {
new Watcher({ new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
functionToCall: async () => { functionToCall: async () => {
await bundleAndReload(); await bundleAndReloadElement();
}, },
timeout: null, timeout: null,
}) })
@@ -77,7 +78,7 @@ export class TsWatch {
'./dist_watch/index.html' './dist_watch/index.html'
) )
); );
await bundleAndReload(); await bundleAndReloadElement();
}, },
timeout: null, timeout: null,
}) })
@@ -98,17 +99,16 @@ export class TsWatch {
timeout: null, timeout: null,
}) })
); );
const bundleAndReload2 = async () => { const bundleAndReloadWebsite = async () => {
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', { await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', {
bundler: 'esbuild' bundler: 'esbuild'
}); });
await smartserve.reload();
} }
this.watcherMap.add( this.watcherMap.add(
new Watcher({ new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'), filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
functionToCall: async () => { functionToCall: async () => {
await bundleAndReload2(); await bundleAndReloadWebsite();
}, },
timeout: null, timeout: null,
}) })
@@ -124,10 +124,10 @@ export class TsWatch {
), ),
plugins.path.join( plugins.path.join(
paths.cwd, paths.cwd,
'./dist_watch/index.html' './dist_serve/index.html'
) )
); );
await bundleAndReload(); await bundleAndReloadWebsite();
}, },
timeout: null, timeout: null,
}) })