Compare commits

...

8 Commits

Author SHA1 Message Date
073685e683 1.0.41 2020-05-22 00:53:11 +00:00
b91b3e0a0c fix(core): update 2020-05-22 00:53:11 +00:00
12d31533f5 1.0.40 2020-05-22 00:46:13 +00:00
f9b8a356e4 fix(core): update 2020-05-22 00:46:12 +00:00
408b6f8fc5 1.0.39 2020-03-13 18:44:22 +00:00
80dd3ee970 fix(core): update 2020-03-13 18:44:21 +00:00
717e1d29ed 1.0.38 2020-03-13 18:19:01 +00:00
a8254e6962 fix(core): update 2020-03-13 18:19:00 +00:00
5 changed files with 19 additions and 40 deletions

30
.snyk
View File

@@ -6,33 +6,18 @@ ignore:
- parcel-bundler > @babel/core > json5 > minimist: - parcel-bundler > @babel/core > json5 > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
parcel-bundler > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > mkdirp > minimist: - parcel-bundler > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
parcel-bundler > @parcel/fs > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > @parcel/fs > mkdirp > minimist: - parcel-bundler > @parcel/fs > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
parcel-bundler > htmlnano > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > htmlnano > svgo > mkdirp > minimist: - parcel-bundler > htmlnano > svgo > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
parcel-bundler > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist: - parcel-bundler > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist: - parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T17:46:49.672Z' expires: '2020-04-12T17:46:49.672Z'
@@ -51,4 +36,19 @@ ignore:
- parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist: - parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given reason: None given
expires: '2020-04-12T18:01:44.139Z' expires: '2020-04-12T18:01:44.139Z'
- parcel-bundler > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > @parcel/fs > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > htmlnano > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
- parcel-bundler > htmlnano > cssnano > cssnano-preset-default > postcss-svgo > svgo > mkdirp > minimist:
reason: None given
expires: '2020-04-12T18:07:10.923Z'
patch: {} patch: {}

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tswatch", "name": "@gitzone/tswatch",
"version": "1.0.37", "version": "1.0.41",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tswatch", "name": "@gitzone/tswatch",
"version": "1.0.37", "version": "1.0.41",
"private": false, "private": false,
"description": "watch typescript projects during development", "description": "watch typescript projects during development",
"main": "dist/index.js", "main": "dist/index.js",

View File

@@ -42,11 +42,6 @@ export class TsWatch {
console.log( console.log(
'bundling TypeScript files to "dist_watch" Note: This is for development only!' 'bundling TypeScript files to "dist_watch" Note: This is for development only!'
); );
this.smartserve = new plugins.smartserve.SmartServe({
port: 3001,
injectReload: true,
serveDir: plugins.path.join(paths.cwd, './dist_watch/')
});
const parcel = new Parcel(); const parcel = new Parcel();
await parcel.start(); await parcel.start();
break; break;

View File

@@ -20,21 +20,6 @@ export class Watcher {
executor: 'bash' executor: 'bash'
}); });
/**
* used to execute
*/
private executionTask: plugins.taskbuffer.Task = new plugins.taskbuffer.Task({
name: 'watcherCommandFunctionTask',
taskFunction: async () => {
if (typeof this.options.commandToExecute === 'string') {
throw new Error('cannot execute string as task');
}
await this.options.commandToExecute();
},
buffered: true,
bufferMax: 1
});
private currentExecution: plugins.smartshell.IExecResultStreaming; private currentExecution: plugins.smartshell.IExecResultStreaming;
private smartchokWatcher = new plugins.smartchok.Smartchok([], {}); private smartchokWatcher = new plugins.smartchok.Smartchok([], {});
private options: IWatcherConstructorOptions; private options: IWatcherConstructorOptions;
@@ -65,16 +50,15 @@ export class Watcher {
if (typeof this.options.commandToExecute === 'string') { if (typeof this.options.commandToExecute === 'string') {
if (this.currentExecution) { if (this.currentExecution) {
logger.log('ok', `reexecuting ${this.options.commandToExecute}`); logger.log('ok', `reexecuting ${this.options.commandToExecute}`);
process.kill(-this.currentExecution.childProcess.pid); process.kill(this.currentExecution.childProcess.pid, 'SIGINT');
} else { } else {
logger.log('ok', `executing ${this.options.commandToExecute} for the first time`); logger.log('ok', `executing ${this.options.commandToExecute} for the first time`);
} }
this.currentExecution = await this.smartshellInstance.execStreaming( this.currentExecution = await this.smartshellInstance.execStreaming(
this.options.commandToExecute this.options.commandToExecute
); );
this.currentExecution = null;
} else { } else {
await this.executionTask.trigger(); console.log('cannot run execution task');
} }
} }