tswatch/dist_ts/tswatch.cli.js

38 lines
3.8 KiB
JavaScript
Raw Normal View History

2022-03-14 21:04:11 +00:00
import * as plugins from './tswatch.plugins.js';
2023-08-26 12:56:09 +00:00
import * as paths from './tswatch.paths.js';
2022-03-14 21:04:11 +00:00
import { logger } from './tswatch.logging.js';
import { TsWatch } from './tswatch.classes.tswatch.js';
2020-05-22 07:25:34 +00:00
const tswatchCli = new plugins.smartcli.Smartcli();
// standard behaviour will assume gitzone setup
2023-03-31 11:10:29 +00:00
tswatchCli.standardCommand().subscribe((argvArg => {
tswatchCli.triggerCommand('npm', {});
}));
2020-05-22 07:25:34 +00:00
tswatchCli.addCommand('element').subscribe(async (argvArg) => {
2022-03-14 21:04:11 +00:00
logger.log('info', `running watch task for a gitzone element project`);
const tsWatch = new TsWatch('gitzone_element');
2020-05-22 07:25:34 +00:00
await tsWatch.start();
});
tswatchCli.addCommand('npm').subscribe(async (argvArg) => {
2022-03-14 21:04:11 +00:00
logger.log('info', `running watch task for a gitzone element project`);
const tsWatch = new TsWatch('gitzone_npm');
2020-05-22 07:25:34 +00:00
await tsWatch.start();
});
tswatchCli.addCommand('service').subscribe(async (argvArg) => {
2022-03-14 21:04:11 +00:00
logger.log('info', `running test task`);
const tsWatch = new TsWatch('gitzone_service');
2020-05-22 07:25:34 +00:00
await tsWatch.start();
});
tswatchCli.addCommand('test').subscribe(async (argvArg) => {
2022-03-14 21:04:11 +00:00
logger.log('info', `running test task`);
const tsWatch = new TsWatch('test');
2020-05-22 07:25:34 +00:00
await tsWatch.start();
});
tswatchCli.addCommand('website').subscribe(async (argvArg) => {
2022-03-14 21:04:11 +00:00
logger.log('info', `running watch task for a gitzone website project`);
const tsWatch = new TsWatch('gitzone_website');
2020-05-22 07:25:34 +00:00
await tsWatch.start();
});
2022-03-14 21:04:11 +00:00
export const runCli = async () => {
2021-03-08 00:26:44 +00:00
tswatchCli.startParse();
};
2023-08-26 12:56:09 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2Z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