Commit 2c16c5b6 authored by David Sveningsson's avatar David Sveningsson

feat(api): better exposure of cli api

parent 536be697
Pipeline #83303359 passed with stages
in 6 minutes and 43 seconds
import { Report } from "../reporter";
import { expandFiles, ExpandOptions } from "./expand-files";
import { getFormatter } from "./formatter";
export class CLI {
public expandFiles(
patterns: string[],
options: ExpandOptions = {}
): string[] {
return expandFiles(patterns, options);
}
public getFormatter(formatters: string): (report: Report) => string {
return getFormatter(formatters);
}
}
......@@ -4,7 +4,7 @@ import path from "path";
const DEFAULT_EXTENSIONS = ["html"];
interface ExpandOptions {
export interface ExpandOptions {
/**
* Working directory. Defaults to `process.cwd()`.
*/
......
import { CLI } from "./cli";
export default CLI;
......@@ -2,6 +2,7 @@
export { default as HtmlValidate } from "./htmlvalidate";
export { AttributeData } from "./parser";
export { CLI } from "./cli/cli";
export { Config, ConfigData, ConfigLoader } from "./config";
export { DynamicValue } from "./dom/dynamic-value";
export { Rule } from "./rule";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment