11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

Home Page:https://www.11ty.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting a file should trigger a build

zachleat opened this issue · comments

was searching for this issue, have to manually rebuild locally after deleting a file

watcher.on("change", async (path) => {
  this.logger.forceLog(`File changed: ${path}`);
  await watchRun(path);
});

watcher.on("add", async (path) => {
  this.logger.forceLog(`File added: ${path}`);
  this.fileSystemSearch.add(path);
  await watchRun(path);
});

watcher.on("unlink", (path) => {
  // this.logger.forceLog(`File removed: ${path}`);
  this.fileSystemSearch.delete(path);
});

process.on("SIGINT", () => this.stopWatch());

https://github.com/11ty/eleventy/blob/master/src/Eleventy.js#L1069C5-L1085C50