Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d7ab769e1 | |||
8ebc438e2d | |||
d0d158ee87 | |||
3ada286495 | |||
0514a74a07 | |||
587d08239a | |||
7ee934eb46 | |||
ebcd8d4b51 | |||
27477253ee |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.66",
|
||||
"version": "1.0.71",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.66",
|
||||
"version": "1.0.71",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@gitzone/tsbundle": "^1.0.100",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.66",
|
||||
"version": "1.0.71",
|
||||
"private": false,
|
||||
"description": "watch typescript projects during development",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@@ -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,10 +48,9 @@ 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 () => {
|
||||
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_watch/bundle.js', {
|
||||
await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', {
|
||||
bundler: 'esbuild'
|
||||
});
|
||||
await smartserve.reload();
|
||||
@@ -102,7 +103,6 @@ export class TsWatch {
|
||||
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', {
|
||||
bundler: 'esbuild'
|
||||
});
|
||||
await smartserve.reload();
|
||||
}
|
||||
this.watcherMap.add(
|
||||
new Watcher({
|
||||
@@ -127,7 +127,7 @@ export class TsWatch {
|
||||
'./dist_watch/index.html'
|
||||
)
|
||||
);
|
||||
await bundleAndReload();
|
||||
await bundleAndReload2();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
|
Reference in New Issue
Block a user