On each [re]build save cache index to a separate file build.yaml inside current directory or use explicitly defined path from command line arguments.
Consider if the default build mode should be rebuild or force build (pub build -r/-f).
Use the index in rebuild mode to determine changed files.
Generate only changed files in rebuild mode.
If existing build.yaml contains a record which source file name not present in the new build.yaml contents, the destination file for this record should be deleted.
Posts update should additionally trigger index, relevant tags, and feed rebuild.
Any page update should trigger sitemap.xml rebuild.
Consider to use md5 or other hash instead of time stamps.
This is a big one!
build.yaml
inside current directory or use explicitly defined path from command line arguments.pub build -r/-f
).build.yaml
contains a record which source file name not present in the newbuild.yaml
contents, the destination file for this record should be deleted.sitemap.xml
rebuild.Sample
build.yaml
contents: