import type {AnyRemotionOption} from './option'; const cliFlag = 'out-dir' as const; let currentOutDir: string | null = null; export const outDirOption = { name: 'Output directory', addedIn: '4.0.426', cliFlag, description: () => { return ( <> Define the location of the resulting bundle. In the CLI, the default is a folder called build, adjacent to the{' '} Remotion Root. In{' '} bundle(), the default is a temporary directory. ); }, ssrName: 'outDir' as const, docLink: 'https://www.remotion.dev/docs/options/out-dir', getValue: ({commandLine}) => { if (commandLine[cliFlag] !== undefined) { return { source: 'cli', value: commandLine[cliFlag] as string, }; } if (currentOutDir !== null) { return { source: 'config', value: currentOutDir, }; } return { source: 'default', value: null, }; }, setConfig: (value: string | null) => { currentOutDir = value; }, type: '' as string | null, id: cliFlag, } satisfies AnyRemotionOption;