diff --git a/quartz/build.ts b/quartz/build.ts index fb56879e2..3707e7177 100644 --- a/quartz/build.ts +++ b/quartz/build.ts @@ -24,8 +24,6 @@ type BuildData = { mut: Mutex initialSlugs: FullSlug[] contentMap: Map - toRebuild: Set - toRemove: Set trackedAssets: Set lastBuildMs: number } @@ -97,8 +95,6 @@ async function startServing( contentMap, ignored: await isGitIgnored(), initialSlugs: ctx.allSlugs, - toRebuild: new Set(), - toRemove: new Set(), trackedAssets: new Set(), lastBuildMs: 0, } @@ -125,20 +121,13 @@ async function rebuild( clientRefresh: () => void, buildData: BuildData, // note: this function mutates buildData ) { - const { - ctx, - ignored, - mut, - initialSlugs, - contentMap, - toRebuild, - toRemove, - trackedAssets, - lastBuildMs, - } = buildData + const { ctx, ignored, mut, initialSlugs, contentMap, trackedAssets, lastBuildMs } = buildData const { argv } = ctx + const toRebuild = new Set() + const toRemove = new Set() + // don't do anything for gitignored files if (ignored(fp)) { return @@ -210,8 +199,6 @@ async function rebuild( release() clientRefresh() - toRebuild.clear() - toRemove.clear() } export default async (argv: Argv, mut: Mutex, clientRefresh: () => void) => {