Skip to main content
Glama
build.ts1.19 kB
import { buildAndWatchIntlayer, type ParallelHandle, runParallel, } from '@intlayer/chokidar'; import { type GetConfigurationOptions, getConfiguration, } from '@intlayer/config'; type BuildOptions = { watch?: boolean; skipPrepare?: boolean; with?: string | string[]; configOptions?: GetConfigurationOptions; }; /** * Get locales dictionaries .content.{json|ts|tsx|js|jsx|mjs|cjs} and build the JSON dictionaries in the .intlayer directory. * Watch mode available to get the change in the .content.{json|ts|tsx|js|jsx|mjs|cjs} */ export const build = async (options?: BuildOptions) => { const config = getConfiguration(options?.configOptions); let parallelProcess: ParallelHandle | null = null; if (options?.with) { parallelProcess = runParallel(options.with); // Handle the promise to avoid unhandled rejection parallelProcess.result.catch(() => { // Parallel process failed or was terminated }); } await buildAndWatchIntlayer({ persistent: options?.watch ?? false, skipPrepare: options?.skipPrepare ?? false, configuration: config, }); if (!options?.watch && parallelProcess) { parallelProcess.kill(); } };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server