Skip to content

🎥 Make videos programmatically with React

740 B
Raw Blame
import type {AnyRemotionOption} from './option';

const cliFlag = 'config' as const;

export const configOption = {
	name: 'Config file',
	addedIn: '1.2.0',
	cliFlag,
	description: () => <>Specify a location for the Remotion config file.</>,
	ssrName: null,
	docLink: 'https://www.remotion.dev/docs/options/config',
	getValue: ({commandLine}) => {
		if (commandLine[cliFlag] !== undefined) {
			return {
				source: 'cli',
				value: commandLine[cliFlag] as string,
			};
		}

		return {
			source: 'default',
			value: null,
		};
	},
	setConfig: () => {
		throw new Error(
			'setConfig is not supported. Pass --config via the CLI instead.',
		);
	},
	type: '' as string | null,
	id: cliFlag,
} satisfies AnyRemotionOption<string | null>;