Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
65f778c40f | |||
4204a61db9 | |||
181369ad3f | |||
d5816b0ed8 | |||
889643e233 | |||
1d3a2dcb64 | |||
9688e3323d | |||
6fa56e9be6 | |||
15e9df5f4f | |||
e0f8503b2b | |||
1337a6ec25 | |||
bd36e3edf3 | |||
89fae2edc9 | |||
82b09ad253 | |||
57ce71cda3 | |||
b171a14c0a | |||
63e0d7fe9e | |||
e2bc505c41 | |||
af82480644 | |||
27a08f11b7 | |||
073f978626 | |||
8d7ab769e1 | |||
8ebc438e2d | |||
d0d158ee87 | |||
3ada286495 | |||
0514a74a07 | |||
587d08239a | |||
7ee934eb46 |
File diff suppressed because one or more lines are too long
9820
package-lock.json
generated
9820
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.67",
|
||||
"version": "2.0.0",
|
||||
"private": false,
|
||||
"description": "watch typescript projects during development",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -13,27 +13,27 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web --skiplibcheck --allowimplicitany)"
|
||||
"build": "(tsbuild --web --allowimplicitany)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.59",
|
||||
"@gitzone/tstest": "^1.0.69",
|
||||
"@pushrocks/tapbundle": "^5.0.2",
|
||||
"@types/node": "^17.0.21"
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tstest": "^1.0.70",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@types/node": "^17.0.31"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gitzone/tsbundle": "^1.0.100",
|
||||
"@gitzone/tsrun": "^1.2.31",
|
||||
"@pushrocks/early": "^3.0.3",
|
||||
"@gitzone/tsbundle": "^2.0.0",
|
||||
"@gitzone/tsrun": "^1.2.32",
|
||||
"@pushrocks/early": "^4.0.2",
|
||||
"@pushrocks/lik": "^5.0.4",
|
||||
"@pushrocks/smartchok": "^1.0.23",
|
||||
"@pushrocks/smartcli": "^3.0.14",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartlog": "^2.0.44",
|
||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
||||
"@pushrocks/smartserve": "^2.0.2",
|
||||
"@pushrocks/smartserve": "^2.0.27",
|
||||
"@pushrocks/smartshell": "^2.0.30",
|
||||
"@pushrocks/taskbuffer": "^2.1.17"
|
||||
"@pushrocks/taskbuffer": "^3.0.1"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@gitzone/tswatch',
|
||||
version: '2.0.0',
|
||||
description: 'watch typescript projects during development'
|
||||
}
|
@@ -17,6 +17,8 @@ export class TsWatch {
|
||||
* starts the TsWatch instance
|
||||
*/
|
||||
public async start() {
|
||||
const tsbundle = new plugins.tsbundle.TsBundle();
|
||||
const htmlHandler = new plugins.tsbundle.HtmlHandler();
|
||||
switch (this.watchmode) {
|
||||
case 'test':
|
||||
this.watcherMap.add(
|
||||
@@ -46,9 +48,8 @@ export class TsWatch {
|
||||
serveDir: plugins.path.join(paths.cwd, './dist_watch/'),
|
||||
port: 3002,
|
||||
});
|
||||
const tsbundle = new plugins.tsbundle.TsBundle();
|
||||
const htmlHandler = new plugins.tsbundle.HtmlHandler();
|
||||
const bundleAndReload = async () => {
|
||||
|
||||
const bundleAndReloadElement = async () => {
|
||||
await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', {
|
||||
bundler: 'esbuild'
|
||||
});
|
||||
@@ -58,7 +59,7 @@ export class TsWatch {
|
||||
new Watcher({
|
||||
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
|
||||
functionToCall: async () => {
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
@@ -77,18 +78,12 @@ export class TsWatch {
|
||||
'./dist_watch/index.html'
|
||||
)
|
||||
);
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
);
|
||||
await smartserve.start();
|
||||
/* const parcel = new plugins.smartparcel.Parcel(
|
||||
plugins.path.join(process.cwd(), './html/index.html'),
|
||||
plugins.path.join(process.cwd(), './dist_watch'),
|
||||
'index.html'
|
||||
);
|
||||
await parcel.watchAndServe(); */
|
||||
break;
|
||||
case 'gitzone_website':
|
||||
this.watcherMap.add(
|
||||
@@ -98,17 +93,16 @@ export class TsWatch {
|
||||
timeout: null,
|
||||
})
|
||||
);
|
||||
const bundleAndReload2 = async () => {
|
||||
const bundleAndReloadWebsite = async () => {
|
||||
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', {
|
||||
bundler: 'esbuild'
|
||||
});
|
||||
await smartserve.reload();
|
||||
}
|
||||
this.watcherMap.add(
|
||||
new Watcher({
|
||||
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
|
||||
functionToCall: async () => {
|
||||
await bundleAndReload2();
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
@@ -124,22 +118,14 @@ export class TsWatch {
|
||||
),
|
||||
plugins.path.join(
|
||||
paths.cwd,
|
||||
'./dist_watch/index.html'
|
||||
'./dist_serve/index.html'
|
||||
)
|
||||
);
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
);
|
||||
|
||||
// client directory
|
||||
/* const parcelWebsite = new plugins.smartparcel.Parcel(
|
||||
plugins.path.join(process.cwd(), './html/index.html'),
|
||||
plugins.path.join(process.cwd(), './dist_serve'),
|
||||
'bundle.js'
|
||||
);
|
||||
await parcelWebsite.watchAndServe(); */
|
||||
break;
|
||||
case 'gitzone_service':
|
||||
this.watcherMap.add(
|
||||
|
@@ -15,7 +15,6 @@ import * as smartcli from '@pushrocks/smartcli';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
|
||||
import * as smartparcel from '@pushrocks/smartparcel';
|
||||
import * as smartserve from '@pushrocks/smartserve';
|
||||
import * as smartshell from '@pushrocks/smartshell';
|
||||
import * as taskbuffer from '@pushrocks/taskbuffer';
|
||||
@@ -27,7 +26,6 @@ export {
|
||||
smartdelay,
|
||||
smartlog,
|
||||
smartlogDestinationLocal,
|
||||
smartparcel,
|
||||
smartserve,
|
||||
smartshell,
|
||||
taskbuffer,
|
||||
|
Reference in New Issue
Block a user