indoorvivants / subatomic

A bad mdoc wrapper nobody should use
https://subatomic.indoorvivants.com
3 stars 1 forks source link

Watch mode and incremental rebuild #165

Open keynmol opened 11 months ago

keynmol commented 11 months ago

It's quite easy to hack

  def react(paths: Set[os.Path]) =
    def shouldReload(paths: Set[os.Path]) =
      paths.exists(_.ext == "md")

    if shouldReload(paths) then blog.main(args.toArray)

  os.watch.watch(
    Seq(blog.config.contentRoot) ++ blog.config.assetsRoot.toSeq,
    react
  )