Compare commits

..

4 Commits

Author SHA1 Message Date
0598357010 1.0.65 2022-03-18 14:17:06 +01:00
9dae6dcda1 fix(core): update 2022-03-18 14:17:05 +01:00
4cf71d2edc 1.0.64 2022-03-18 13:18:15 +01:00
0eec0c04e8 fix(core): update 2022-03-18 13:18:15 +01:00
4 changed files with 172 additions and 1021 deletions

1159
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@gitzone/tswatch",
"version": "1.0.63",
"version": "1.0.65",
"private": false,
"description": "watch typescript projects during development",
"main": "dist_ts/index.js",
@@ -22,6 +22,7 @@
"@types/node": "^17.0.21"
},
"dependencies": {
"@gitzone/tsbundle": "^1.0.99",
"@gitzone/tsrun": "^1.2.31",
"@pushrocks/early": "^3.0.3",
"@pushrocks/lik": "^5.0.4",
@@ -30,7 +31,7 @@
"@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartlog-destination-local": "^8.0.8",
"@pushrocks/smartserve": "^2.0.0",
"@pushrocks/smartserve": "^2.0.2",
"@pushrocks/smartshell": "^2.0.30",
"@pushrocks/taskbuffer": "^2.1.17"
},

View File

@@ -43,17 +43,26 @@ export class TsWatch {
);
const smartserve = new plugins.smartserve.SmartServe({
injectReload: true,
serveDir: plugins.path.join(paths.cwd, './ts_web/'),
serveDir: plugins.path.join(paths.cwd, './dist_watch/'),
port: 3002,
});
const tsbundle = new plugins.tsbundle.TsBundle();
const bundleAndReload = async () => {
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_watch/bundle.js', {
bundler: 'esbuild'
});
await smartserve.reload();
}
this.watcherMap.add(
new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
commandToExecute: 'npm run bundle',
functionToCall: smartserve.reload,
functionToCall: async () => {
await bundleAndReload();
},
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'),
@@ -69,6 +78,13 @@ export class TsWatch {
timeout: null,
})
);
this.watcherMap.add(
new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts_web/'),
commandToExecute: 'npm run bundle',
timeout: null,
})
);
// client directory
/* const parcelWebsite = new plugins.smartparcel.Parcel(

View File

@@ -1,6 +1,13 @@
// node native scope
import * as path from 'path';
export { path };
// @gitzone scope
import * as tsbundle from '@gitzone/tsbundle';
export {
tsbundle
}
// @pushrocks scope
import * as lik from '@pushrocks/lik';
import * as smartchok from '@pushrocks/smartchok';