MCPcopy
hub / github.com/rollup/rollup / add

Function add

cli/run/batchWarnings.ts:30–43  ·  view source on GitHub ↗
(warning: RollupLog)

Source from the content-addressed store, hash-verified

28 let warningOccurred = false;
29
30 const add = (warning: RollupLog) => {
31 count += 1;
32 warningOccurred = true;
33
34 if (silent) return;
35 if ((warning.code as string) in deferredHandlers) {
36 getOrCreate(deferredWarnings, warning.code, getNewArray).push(warning);
37 } else if ((warning.code as string) in immediateHandlers) {
38 immediateHandlers[warning.code!](warning);
39 } else {
40 title(warning.message);
41 defaultBody(warning);
42 }
43 };
44
45 return {
46 add,

Callers 1

logFunction · 0.70

Calls 4

getOrCreateFunction · 0.90
titleFunction · 0.85
defaultBodyFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected