Skip to content

Commit 32b8a15

Browse files
authored
Merge pull request #1 from wuespace/cli-docs
Add documentation to the `runCLI` function
2 parents dc895da + 5b42b1d commit 32b8a15

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/extract/runCLI.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ 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+
* ```ts
13+
* import.meta.main && await runCLI(options, import.meta.dirname);
14+
* ```
15+
*/
616
export async function runCLI({
717
pattern = "**/*.{ts,tsx}",
818
languages,

0 commit comments

Comments
 (0)