UNPKG

@intlayer/chokidar

Version:

Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.

30 lines (29 loc) 1.22 kB
import { UnmergedDictionaryOutput } from "./writeUnmergedDictionary.js"; import { IntlayerConfig } from "@intlayer/types/config"; import { Dictionary } from "@intlayer/types/dictionary"; //#region src/buildIntlayerDictionary/writeMergedDictionary.d.ts type MergedDictionaryResult = { dictionaryPath: string; dictionary: Dictionary; }; type MergedDictionaryOutput = Record<string, MergedDictionaryResult>; /** * Write the merged dictionaries to the dictionariesDir * @param groupedDictionaries - The grouped dictionaries * @param configuration - The configuration * @returns The merged dictionaries * * @example * ```ts * const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries); * const finalDictionaries = await writeFinalDictionaries(unmergedDictionaries); * console.log(finalDictionaries); * * // .intlayer/dictionary/home.json * // { key: 'home', content: { ... } }, * ``` */ declare const writeMergedDictionaries: (groupedDictionaries: UnmergedDictionaryOutput, configuration: IntlayerConfig) => Promise<MergedDictionaryOutput>; //#endregion export { MergedDictionaryOutput, MergedDictionaryResult, writeMergedDictionaries }; //# sourceMappingURL=writeMergedDictionary.d.ts.map