fix(core): update
This commit is contained in:
parent
ef5d4d2a9c
commit
0eec0c04e8
1141
package-lock.json
generated
1141
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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",
|
||||
|
@ -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(
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user