#!/usr/bin/env ts-node import program from "commander"; import path from "path"; import watch from "../"; function list(val: string) { return val.split(","); } program .version("0.1.0") .usage("") .option("-o, --only ", "only run the specified watcher", list) .arguments("") .description("Run watchers defined in ") .action((configFile, cmd) => { const { only = [] } = cmd; let config: any = require(path.resolve(configFile)); if (config.__esModule) { config = config.default; } watch(config, { only }); }) .parse(process.argv);