From 041a4ce7bc39c65483eaeeddc97e6946cb49f540 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Jul 2023 07:04:01 +0000
Subject: [PATCH] fix watch-mode batching
---
quartz/plugins/emitters/componentResources.ts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/quartz/plugins/emitters/componentResources.ts b/quartz/plugins/emitters/componentResources.ts
index 99f9657..bc1d4ab 100644
--- a/quartz/plugins/emitters/componentResources.ts
+++ b/quartz/plugins/emitters/componentResources.ts
@@ -20,10 +20,10 @@
afterDOMLoaded: string[]
}
-function getComponentResources(plugins: PluginTypes): ComponentResources {
+function getComponentResources(ctx: BuildCtx): ComponentResources {
const allComponents: Set<QuartzComponent> = new Set()
- for (const emitter of plugins.emitters) {
- const components = emitter.getQuartzComponents()
+ for (const emitter of ctx.cfg.plugins.emitters) {
+ const components = emitter.getQuartzComponents(ctx)
for (const component of components) {
allComponents.add(component)
}
@@ -127,7 +127,7 @@
},
async emit(ctx, _content, resources, emit): Promise<FilePath[]> {
// component specific scripts and styles
- const componentResources = getComponentResources(ctx.cfg.plugins)
+ const componentResources = getComponentResources(ctx)
// important that this goes *after* component scripts
// as the "nav" event gets triggered here and we should make sure
// that everyone else had the chance to register a listener for it
--
Gitblit v1.10.0