Compare commits

...

6 Commits

Author SHA1 Message Date
4d23145529 1.0.32 2020-03-09 14:52:38 +00:00
27e0d7588d fix(core): update 2020-03-09 14:52:37 +00:00
88d4bf6be0 1.0.31 2020-03-05 09:26:41 +00:00
d4f8215f35 fix(core): update 2020-03-05 09:26:41 +00:00
85f72feeb9 1.0.30 2019-10-14 14:57:43 +02:00
bd4ccbd215 fix(core): update 2019-10-14 14:57:43 +02:00
4 changed files with 1225 additions and 1012 deletions

2170
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tswatch", "name": "@gitzone/tswatch",
"version": "1.0.29", "version": "1.0.32",
"private": false, "private": false,
"description": "watch typescript projects during development", "description": "watch typescript projects during development",
"main": "dist/index.js", "main": "dist/index.js",
@@ -17,24 +17,24 @@
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.17", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tstest": "^1.0.28", "@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.0.13", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^12.7.12", "@types/node": "^13.9.0",
"tslint": "^5.20.0", "tslint": "^6.0.0",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@gitzone/tsbundle": "^1.0.47", "@gitzone/tsbundle": "^1.0.51",
"@gitzone/tsrun": "^1.2.8", "@gitzone/tsrun": "^1.2.8",
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^3.0.3",
"@pushrocks/lik": "^3.0.11", "@pushrocks/lik": "^3.0.19",
"@pushrocks/smartchok": "^1.0.23", "@pushrocks/smartchok": "^1.0.23",
"@pushrocks/smartcli": "^3.0.7", "@pushrocks/smartcli": "^3.0.7",
"@pushrocks/smartdelay": "^2.0.3", "@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartlog-destination-local": "^8.0.2", "@pushrocks/smartlog-destination-local": "^8.0.2",
"@pushrocks/smartserve": "^1.1.37", "@pushrocks/smartserve": "^1.1.39",
"@pushrocks/smartshell": "^2.0.25", "@pushrocks/smartshell": "^2.0.25",
"@pushrocks/taskbuffer": "^2.0.15" "@pushrocks/taskbuffer": "^2.1.1"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@@ -38,10 +38,11 @@ export class TsWatch {
break; break;
case 'gitzone_element': case 'gitzone_element':
// lets create a standard server // lets create a standard server
console.log('bundling TypeScript files to "dist_watch" Note: This is for development only!');
this.smartserve = new plugins.smartserve.SmartServe({ this.smartserve = new plugins.smartserve.SmartServe({
port: 3001, port: 3001,
injectReload: true, injectReload: true,
serveDir: plugins.path.join(paths.cwd, './dist_web/') serveDir: plugins.path.join(paths.cwd, './dist_watch/')
}); });
this.watcherMap.add( this.watcherMap.add(
new Watcher({ new Watcher({
@@ -49,8 +50,8 @@ export class TsWatch {
commandToExecute: async () => { commandToExecute: async () => {
const tsbundle = new plugins.tsbundle.TsBundle(); const tsbundle = new plugins.tsbundle.TsBundle();
const htmlHandler = new plugins.tsbundle.HtmlHandler(); const htmlHandler = new plugins.tsbundle.HtmlHandler();
await tsbundle.buildProduction('./ts_web/index.ts', './dist_web/bundle.js'); await tsbundle.buildTest('./ts_web/index.ts', './dist_watch/bundle.js');
await htmlHandler.copyHtml(); await htmlHandler.copyHtml(plugins.path.join(process.cwd(), './dist_watch/index.html'));
}, },
timeout: null timeout: null
}) })
@@ -74,6 +75,15 @@ export class TsWatch {
}) })
); );
break; break;
case 'gitzone_service':
this.watcherMap.add(
new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts/'),
commandToExecute: 'npm run startTs',
timeout: null
})
);
break;
case 'echoSomething': case 'echoSomething':
const tsWatchInstanceEchoSomething = new Watcher({ const tsWatchInstanceEchoSomething = new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, './ts'), filePathToWatch: plugins.path.join(paths.cwd, './ts'),
@@ -89,6 +99,7 @@ export class TsWatch {
await watcher.start(); await watcher.start();
}); });
if (this.smartserve) { if (this.smartserve) {
await this.smartserve.start(); await this.smartserve.start();
} }
} }

View File

@@ -8,18 +8,6 @@ const tswatchCli = new plugins.smartcli.Smartcli();
// standard behaviour will assume gitzone setup // standard behaviour will assume gitzone setup
tswatchCli.addCommand('test').subscribe(async argvArg => {
logger.log('info', `running test task`);
const tsWatch = new TsWatch('test');
await tsWatch.start();
});
tswatchCli.addCommand('website').subscribe(async argvArg => {
logger.log('info', `running watch task for a gitzone website project`);
const tsWatch = new TsWatch('gitzone_website');
await tsWatch.start();
});
tswatchCli.addCommand('element').subscribe(async argvArg => { tswatchCli.addCommand('element').subscribe(async argvArg => {
logger.log('info', `running watch task for a gitzone element project`); logger.log('info', `running watch task for a gitzone element project`);
const tsWatch = new TsWatch('gitzone_element'); const tsWatch = new TsWatch('gitzone_element');
@@ -32,4 +20,22 @@ tswatchCli.addCommand('npm').subscribe(async argvArg => {
await tsWatch.start(); await tsWatch.start();
}); });
tswatchCli.addCommand('service').subscribe(async argvArg => {
logger.log('info', `running test task`);
const tsWatch = new TsWatch('gitzone_service');
await tsWatch.start();
});
tswatchCli.addCommand('test').subscribe(async argvArg => {
logger.log('info', `running test task`);
const tsWatch = new TsWatch('test');
await tsWatch.start();
});
tswatchCli.addCommand('website').subscribe(async argvArg => {
logger.log('info', `running watch task for a gitzone website project`);
const tsWatch = new TsWatch('gitzone_website');
await tsWatch.start();
});
tswatchCli.startParse(); tswatchCli.startParse();