-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around middleman deploy issue #114
Borrowing a hotfix extension from this discussion: karlfreeman/middleman-deploy#114 The problem: for somereason mm-deploy starts deploying the source files to gh-pages isntead of the built output. This extension forcibly removes the build dir every time, which seems to solve the problem.
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#lib/build_cleaner.rb | ||
|
||
class BuildCleaner < Middleman::Extension | ||
|
||
def initialize(app, options_hash={}, &block) | ||
super | ||
FileUtils.rm_rf app.config[:build_dir] | ||
end | ||
|
||
end | ||
|
||
::Middleman::Extensions.register(:build_cleaner, BuildCleaner) |