MCPcopy
hub / github.com/rollup/rollup / loadConfigFromCommand

Function loadConfigFromCommand

cli/run/loadConfigFromCommand.ts:9–23  ·  view source on GitHub ↗
(
	commandOptions: Record<string, unknown>,
	watchMode: boolean
)

Source from the content-addressed store, hash-verified

7import { stdinName } from './stdin';
8
9export default async function loadConfigFromCommand(
10 commandOptions: Record<string, unknown>,
11 watchMode: boolean
12): Promise<{
13 options: MergedRollupOptions[];
14 warnings: BatchWarnings;
15}> {
16 const warnings = batchWarnings(commandOptions);
17 if (!commandOptions.input && (commandOptions.stdin || !process.stdin.isTTY)) {
18 commandOptions.input = stdinName;
19 }
20 const options = await mergeOptions({ input: [] }, watchMode, commandOptions, warnings.log);
21 await addCommandPluginsToInputOptions(options, commandOptions);
22 return { options: [options], warnings };
23}

Callers 2

getConfigsFunction · 0.85
watchFunction · 0.85

Calls 3

mergeOptionsFunction · 0.90
batchWarningsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…