Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a file should trigger a build #2798

Open
zachleat opened this issue Feb 8, 2023 · 2 comments · May be fixed by #3482
Open

Deleting a file should trigger a build #2798

zachleat opened this issue Feb 8, 2023 · 2 comments · May be fixed by #3482

Comments

@zachleat
Copy link
Member

zachleat commented Feb 8, 2023

No description provided.

@murtuzaalisurti
Copy link

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

aurmartin pushed a commit to aurmartin/eleventy that referenced this issue Oct 12, 2024
aurmartin added a commit to aurmartin/eleventy that referenced this issue Oct 12, 2024
aurmartin added a commit to aurmartin/eleventy that referenced this issue Oct 16, 2024
@zachleat
Copy link
Member Author

The issue here is a bit bigger picture than the simple code change at #3482 suggests, it’s a larger architectural issue that Eleventy doesn’t remove anything in the output directory: #19

Deleting a file can re-run the build, but that file will still exist in the output directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants