-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
25 lines (22 loc) · 894 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { environment, projects } from "./config.js";
import { ProcessProject } from "./ProcessProject.js";
import { ChartReporter } from "./reporters/ChartReporter.js";
import { CliReporter } from "./reporters/CliReporter.js";
import { FSReporter } from "./reporters/FSReporter.js";
import { ResultsIO } from "./ResultsIO.js";
import { Environment } from "./types.js";
const commonReporterArguments: [Partial<Environment>] = [environment];
const reporters = [
new FSReporter(...commonReporterArguments, new ResultsIO()),
new CliReporter(...commonReporterArguments),
new ChartReporter(...commonReporterArguments),
];
do {
for (const project of projects) {
const processProject = new ProcessProject(project, reporters);
await processProject.main();
}
} while (process.argv.includes("--run-indefinitely"));
for (const reporter of reporters) {
await reporter.afterAll?.();
}