Skip to content
Permalink
Browse files

Workaround for Middleman deploy issue

  • Loading branch information...
jodosha committed Jan 29, 2016
1 parent 4d0509a commit 6db8d3b0539204a32d6f871644d98434fa24e538
Showing with 13 additions and 1 deletion.
  1. +2 −1 bin/site
  2. +2 −0 config.rb
  3. +9 −0 extensions/build_cleaner.rb
@@ -16,7 +16,8 @@ function build_site {
}

function publish_site {
_middleman deploy --build-before
_middleman deploy
git checkout build
}

function print_help {
@@ -1,5 +1,6 @@
require 'rack/utils'
require 'middleman-syntax'
require_relative "./extensions/build_cleaner"

###
# Compass
@@ -192,4 +193,5 @@ def hanami_version

# Or use a different image path
# set :http_prefix, "/Content/images/"
activate :build_cleaner
end
@@ -0,0 +1,9 @@
#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)

0 comments on commit 6db8d3b

Please sign in to comment.
You can’t perform that action at this time.