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

--incremental=filename.md for incremental build without --watch or --serve #3324

Closed
LeaVerou opened this issue Jun 17, 2024 · 5 comments
Closed

Comments

@LeaVerou
Copy link

Not sure if this is a bug or a feature request. The --incremental flag is a wonderful thing: instead of rebuilding a whole site, it rebuilds only the files relevant to the one that changed. However, it seems to only be available when running in watch mode. I’ve often needed to only periodically rebuild; I save often and running the watcher often makes my system veeeery sloooow after a while, especially since I have many 11ty websites that I often edit in parallel. However, this also means I lose access to this wonderful feature: even if I were willing to manually specify the file that changed, there is no way to do so.

It would be great if --incremental worked without --watch. It could automatically detect which files have changed by storing the last time it ran somewhere and comparing timestamps. Or, worst case, even if it allowed providing a glob or filename manually, it would still be an immense help.

@zachleat zachleat added this to the Eleventy 3.0.0 milestone Jun 20, 2024
@zachleat zachleat changed the title --incremental is ignored when --watch is not present --incremental=filename.md for incremental build without --watch or --serve Jun 20, 2024
@zachleat
Copy link
Member

v3.0.0-alpha.14 will include support for --incremental=filename to do an incremental build without --watch or --serve.

@zachleat zachleat added the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Jun 20, 2024
@zachleat
Copy link
Member

Work based on the singleTemplateScope feature that was included for the the serverless plugin: b5fc1c3

More background here: https://www.11ty.dev/docs/plugins/serverless/#compile-the-data-cascade-for-the-project

@zachleat zachleat removed the needs-votes A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved. label Jun 20, 2024
@zachleat
Copy link
Member

zachleat commented Jun 20, 2024

Example output from https://github.com/zachleat/zachleat.com:

npx @11ty/eleventy --quiet --incremental=index.liquid
[11ty/eleventy-img] 1 image optimized (1 cached)
[11ty] Wrote 1 file (skipped 481) in 2.12 seconds (v3.0.0-alpha.14)

@zachleat
Copy link
Member

Subscribe to #984 for full cold-start incremental support!

@zachleat
Copy link
Member

Filed related issue for --incremental=glob enhancement here: #3335

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

No branches or pull requests

2 participants