-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
after_build should be inside after_config to respect ordering of conf…
…ig.rb
- Loading branch information
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a503498
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but I disagree here and the MM forum does, too
http://forum.middlemanapp.com/t/order-of-after-build-callbacks/901/8
"...But if you look at the sync extension, it registers its after_build callback inside an after_configuration callback, which gets run after everything in your config.rb has been processed. So no matter when you activate sync, its after_build stuff gets added after cloudfront's..."
I'm seeing file permissions not preserved when I activate imageoptim, so I wrote a quick shell script to run in the after_build callback to properly set all the image files in my build/images directory to sane file permission settings.
If this gem's after_build block is inside after_configuration, the order I activate my extension (runs my shell script) is not preserved. When no after after_config block exists, the order I activate extensions is preserved.