Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
e2bc505c41 | |||
af82480644 | |||
27a08f11b7 | |||
073f978626 | |||
8d7ab769e1 | |||
8ebc438e2d | |||
d0d158ee87 | |||
3ada286495 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.69",
|
||||
"version": "1.0.73",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.69",
|
||||
"version": "1.0.73",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@gitzone/tsbundle": "^1.0.100",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/tswatch",
|
||||
"version": "1.0.69",
|
||||
"version": "1.0.73",
|
||||
"private": false,
|
||||
"description": "watch typescript projects during development",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@@ -49,7 +49,7 @@ export class TsWatch {
|
||||
port: 3002,
|
||||
});
|
||||
|
||||
const bundleAndReload = async () => {
|
||||
const bundleAndReloadElement = async () => {
|
||||
await tsbundle.build(paths.cwd, './html/index.ts', './dist_watch/bundle.js', {
|
||||
bundler: 'esbuild'
|
||||
});
|
||||
@@ -59,7 +59,7 @@ export class TsWatch {
|
||||
new Watcher({
|
||||
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
|
||||
functionToCall: async () => {
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
@@ -78,7 +78,7 @@ export class TsWatch {
|
||||
'./dist_watch/index.html'
|
||||
)
|
||||
);
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadElement();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
@@ -99,17 +99,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,
|
||||
})
|
||||
@@ -125,10 +124,10 @@ export class TsWatch {
|
||||
),
|
||||
plugins.path.join(
|
||||
paths.cwd,
|
||||
'./dist_watch/index.html'
|
||||
'./dist_serve/index.html'
|
||||
)
|
||||
);
|
||||
await bundleAndReload();
|
||||
await bundleAndReloadWebsite();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
|
Reference in New Issue
Block a user