Jacky Zhao
2023-08-05 9e76b257d4be4b9e6ea7b514074ef74d8d125f4b
quartz/build.ts
@@ -91,6 +91,7 @@
        clearTimeout(timeoutId)
      }
      // debounce rebuilds every 250ms
      timeoutId = setTimeout(async () => {
        const perf = new PerfTimer()
        console.log(chalk.yellow("Detected change, rebuilding..."))
@@ -99,7 +100,7 @@
          ctx.allSlugs = [...new Set([...contentMap.keys(), ...toRebuild])]
            .filter((fp) => !toRemove.has(fp))
            .map((fp) => slugifyFilePath(path.relative(argv.directory, fp) as FilePath))
            .map((fp) => slugifyFilePath(path.posix.relative(argv.directory, fp) as FilePath))
          const parsedContent = await parseMarkdown(ctx, filesToRebuild)
          for (const content of parsedContent) {