Jacky Zhao
2024-01-31 355aa2231879468bf9b08d1322710619c8d1fdb1
docs: fix outdated comment on rebuild debounce behaviour
1 files modified
7 ■■■■■ changed files
quartz/build.ts 7 ●●●●● patch | view | raw | blame | history
quartz/build.ts
@@ -135,7 +135,6 @@
    toRebuild,
    toRemove,
    trackedAssets,
    lastBuildMs,
  } = buildData
  const { argv } = ctx
@@ -164,12 +163,12 @@
    toRemove.add(filePath)
  }
  // debounce rebuilds every 250ms
  const buildStart = new Date().getTime()
  buildData.lastBuildMs = buildStart
  const release = await mut.acquire()
  if (lastBuildMs > buildStart) {
  // there's another build after us, release and let them do it
  if (buildData.lastBuildMs > buildStart) {
    release()
    return
  }