tswatch/ts/tswatch.cli.ts

44 lines
1.3 KiB
TypeScript
Raw Permalink Normal View History

2018-10-28 00:48:43 +00:00
import * as plugins from './tswatch.plugins';
import * as paths from './tswatch.paths';
2019-05-08 09:14:57 +00:00
import { logger } from './tswatch.logging';
2018-10-28 00:48:43 +00:00
import { TsWatch } from './tswatch.classes.tswatch';
const tswatchCli = new plugins.smartcli.Smartcli();
2019-05-08 09:14:57 +00:00
// standard behaviour will assume gitzone setup
2020-07-04 10:45:56 +00:00
tswatchCli.addCommand('element').subscribe(async (argvArg) => {
2019-10-12 13:07:44 +00:00
logger.log('info', `running watch task for a gitzone element project`);
const tsWatch = new TsWatch('gitzone_element');
await tsWatch.start();
});
2020-07-04 10:45:56 +00:00
tswatchCli.addCommand('npm').subscribe(async (argvArg) => {
2019-10-14 12:53:55 +00:00
logger.log('info', `running watch task for a gitzone element project`);
const tsWatch = new TsWatch('gitzone_npm');
await tsWatch.start();
});
2020-07-04 10:45:56 +00:00
tswatchCli.addCommand('service').subscribe(async (argvArg) => {
2019-10-14 12:57:43 +00:00
logger.log('info', `running test task`);
const tsWatch = new TsWatch('gitzone_service');
await tsWatch.start();
});
2020-07-04 10:45:56 +00:00
tswatchCli.addCommand('test').subscribe(async (argvArg) => {
2019-10-14 12:57:43 +00:00
logger.log('info', `running test task`);
const tsWatch = new TsWatch('test');
await tsWatch.start();
});
2020-07-04 10:45:56 +00:00
tswatchCli.addCommand('website').subscribe(async (argvArg) => {
2019-10-14 12:57:43 +00:00
logger.log('info', `running watch task for a gitzone website project`);
const tsWatch = new TsWatch('gitzone_website');
await tsWatch.start();
});
2020-05-22 08:14:59 +00:00
export const runCli = async () => {
tswatchCli.startParse();
};