Skip to content

Commit ca1b9c9

Browse files
committed
Add documentation to the runCLI function
Since this function is usually called from the application's config file, it is also considered to be a library function. Therefore, it requires documentation.
1 parent dc895da commit ca1b9c9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/extract/runCLI.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import { Extractions } from "./Extractions.ts";
33
import { JsonWriter } from "./JsonWriter.ts";
44
import { TypeScriptSourceFile } from "./TypeScriptSourceFile.ts";
55

6+
/**
7+
* Runs the i18n extraction CLI with the given options.
8+
* @param options the {@link InitHonolateOptions} for the project
9+
* @param rootDir the root directory of the project. Usually `import.meta.dirname`.
10+
*
11+
* @example Running from the configuration options
12+
* import.meta.main && await runCLI(options, import.meta.dirname);
13+
*/
614
export async function runCLI({
715
pattern = "**/*.{ts,tsx}",
816
languages,

0 commit comments

Comments
 (0)