MCPcopy
hub / github.com/rollup/rollup / getGeneratedCode

Function getGeneratedCode

src/utils/options/normalizeOutputOptions.ts:357–372  ·  view source on GitHub ↗
(config: OutputOptions)

Source from the content-addressed store, hash-verified

355};
356
357const getGeneratedCode = (config: OutputOptions): NormalizedOutputOptions['generatedCode'] => {
358 const configWithPreset = getOptionWithPreset(
359 config.generatedCode,
360 generatedCodePresets,
361 'output.generatedCode',
362 URL_OUTPUT_GENERATEDCODE,
363 ''
364 );
365 return {
366 arrowFunctions: configWithPreset.arrowFunctions === true,
367 constBindings: configWithPreset.constBindings === true,
368 objectShorthand: configWithPreset.objectShorthand === true,
369 reservedNamesAsProps: configWithPreset.reservedNamesAsProps !== false,
370 symbols: configWithPreset.symbols === true
371 };
372};
373
374const getIndent = (config: OutputOptions, compact: boolean): NormalizedOutputOptions['indent'] => {
375 if (compact) {

Callers 1

normalizeOutputOptionsFunction · 0.85

Calls 1

getOptionWithPresetFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…