UNPKG

@intlayer/chokidar

Version:

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

19 lines 677 B
import { existsSync, rmSync } from "fs"; import { getConfiguration } from "@intlayer/config"; import { createDictionaryEntryPoint } from "./transpiler/dictionary_to_main/createDictionaryEntryPoint.mjs"; const cleanOutputDir = (configuration = getConfiguration()) => { const { resultDir, typesDir, dictionariesDir } = configuration.content; if (existsSync(resultDir)) { if (existsSync(dictionariesDir)) { rmSync(dictionariesDir, { recursive: true }); } if (existsSync(typesDir)) { rmSync(typesDir, { recursive: true }); } } createDictionaryEntryPoint(configuration); }; export { cleanOutputDir }; //# sourceMappingURL=cleanOutputDir.mjs.map