mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Implement Timestamp
Merge branch 'next' into timestamp Fix test and translations Merge branch 'timestamp' of github.com:coralproject/talk into timestamp * 'timestamp' of github.com:coralproject/talk: Fix test and translations Implement Timestamp
This commit is contained in:
@@ -4,16 +4,24 @@ import program from "commander";
|
||||
import path from "path";
|
||||
import watch from "../";
|
||||
|
||||
function list(val: string) {
|
||||
return val.split(",");
|
||||
}
|
||||
|
||||
program
|
||||
.version("0.1.0")
|
||||
.usage("<configFile>")
|
||||
.option("-o, --only <watcher>", "only run the specified watcher", list)
|
||||
.arguments("<configFile>")
|
||||
.description("Run watchers defined in <configFile>")
|
||||
.action(configFile => {
|
||||
.action((configFile, cmd) => {
|
||||
const { only = [] } = cmd;
|
||||
|
||||
let config: any = require(path.resolve(configFile));
|
||||
if (config.__esModule) {
|
||||
config = config.default;
|
||||
}
|
||||
watch(config);
|
||||
|
||||
watch(config, { only });
|
||||
})
|
||||
.parse(process.argv);
|
||||
|
||||
Reference in New Issue
Block a user