diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-01 13:31:15 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-01 20:06:23 -0400 |
commit | 6c7c81fcdb5574c47fc59809005d1066123abb28 (patch) | |
tree | 921bf003f4b22a20838dd825d84a2f50d755a898 /src/content/dependencies | |
parent | 01574bba9d2af7d50a6baa1b33dc5901fb6f2391 (diff) |
infra, write: use showAggregate when loading content functions
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/index.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js index 58bac0d2..95247e9c 100644 --- a/src/content/dependencies/index.js +++ b/src/content/dependencies/index.js @@ -8,7 +8,11 @@ import {ESLint} from 'eslint'; import {colors, logWarn} from '#cli'; import contentFunction, {ContentFunctionSpecError} from '#content-function'; -import {annotateFunction} from '#sugar'; + +import { + annotateFunction, + showAggregate as _showAggregate +} from '#sugar'; function cachebust(filePath) { if (filePath in cachebust.cache) { @@ -25,6 +29,7 @@ cachebust.cache = Object.create(null); export function watchContentDependencies({ mock = null, logging = true, + showAggregate = _showAggregate, } = {}) { const events = new EventEmitter(); const contentDependencies = {}; @@ -229,7 +234,7 @@ export function watchContentDependencies({ } else if (error instanceof ContentFunctionSpecError) { console.error(colors.yellow(error.message)); } else { - console.error(error); + showAggregate(error); } } |