Delay recalculating sitemap until absolutely necessary, avoiding redundant recalculations.

This commit is contained in:
Ben Hollis 2012-09-15 22:24:39 -07:00
parent a8a555c101
commit 6c241603ac
6 changed files with 70 additions and 36 deletions

View file

@ -242,6 +242,7 @@ module Middleman::Cli
# Double-check for compass sprites
@app.files.find_new_files((Pathname(@app.source_dir) + @app.images_dir).relative_path_from(@app.root_path))
@app.sitemap.ensure_resource_list_updated!
# Sort paths to be built by the above order. This is primarily so Compass can
# find files in the build folder when it needs to generate sprites for the