tswatch/dist_ts/tswatch.cli.js

35 lines
3.5 KiB
JavaScript
Raw Normal View History

2022-03-14 21:04:11 +00:00
import * as plugins from './tswatch.plugins.js';
import './tswatch.paths.js';
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
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();
};
2022-03-14 21:04:11 +00:00
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHN3YXRjaC5jbGkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c3dhdGNoLmNsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbm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