mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 11:38:20 +08:00
b9a8fdb77b
Merge pull request #1731 from coralproject/next-watcher-flags Watcher --only Use JSDocs comments (#1727) Merge branch 'next' into prevent-compile-loop-relay Merge pull request #1726 from coralproject/prevent-compile-loop-relay [next] Adapt relay watch config [next] Remove nodemon (#1725) * Remove old nodemon configs * Remove nodemon [next] Jest implementation for React Components (#1733) * Make jest testing work with custom path and css modules * Add first test * feat: added unit tests to ci * fix: updated package-lock.json * Update cssTransform.js * Update cssTransform.js * Fix test in ci Adapt files.exclude (#1736) Permalink ui Adding Copy to clipboard functionality WIP clean request wip progress progress work in progress wip ui functionality Translations :/ wip Merge branch 'permalink' of github.com:coralproject/talk into permalink * 'permalink' of github.com:coralproject/talk: (42 commits) [next] Support server side jest testing (#1747) Update snapshots Add comments Remove precss Move react-responsive to dev deps Remove comment Mobile first approach Support standard css variables, dynamically set spacing-unit Add docs Fully implement Flex and MatchMedia Responsive Components <3 fix: linting fix: adjusted pageInfo Remove obsoloe snapshot Move jsdom to dev deps Mark comments as always returning a value Add comment Fix unit tests Translate, concept for translation and id strings Add aria props ... Adding Attachment and Popover Component merge conflicts progress Any Working Support for refs Ready Merge branch 'permalink' of github.com:coralproject/talk into permalink * 'permalink' of github.com:coralproject/talk: (101 commits) Ready Support for refs Working Any progress merge conflicts Make timeagoFormatter optional More colors Colors Short circuit endless respawn fix: new mongo parser Remove jest from watcher config, as it doesnt run well inside Add jest set Apply suggestions Move react-timeago to dev Upgrade docz Cleanup docz scripts Support watcher sets [next] Support server side jest testing (#1747) Make filter only a pure function ...
40 lines
901 B
TypeScript
40 lines
901 B
TypeScript
#!/usr/bin/env ts-node
|
|
|
|
import program from "commander";
|
|
import path from "path";
|
|
import watch from "../";
|
|
|
|
async function run(
|
|
args: ReadonlyArray<string>,
|
|
options: Record<string, string>
|
|
) {
|
|
const only = args;
|
|
const { config: configFile = "" } = options;
|
|
if (!configFile) {
|
|
throw new Error("Config file not specified");
|
|
}
|
|
|
|
// tslint:disable-next-line:no-var-requires
|
|
let config: any = require(path.resolve(configFile));
|
|
if (config.__esModule) {
|
|
config = config.default;
|
|
}
|
|
|
|
try {
|
|
await watch(config, { only });
|
|
} catch (err) {
|
|
// tslint:disable-next-line:no-console
|
|
console.error(err);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
const cmd = program
|
|
.version("0.1.0")
|
|
.usage("[watchers or sets]")
|
|
.option("-c, --config <configFile>", "Use given config file")
|
|
.description("Run watchers defined in <configFile>")
|
|
.parse(process.argv);
|
|
|
|
run(cmd.args, cmd.opts());
|