dont hardcode ignored build dir name

This commit is contained in:
Thomas Reynolds 2013-06-23 15:15:43 -07:00
parent 15ec5441c3
commit 3399ee207e

View file

@ -7,13 +7,13 @@ module Middleman
module FileWatcher module FileWatcher
IGNORE_LIST = [ IGNORE_LIST = [
/^bin\//,
/^\.bundle\//, /^\.bundle\//,
/^vendor\//, /^vendor\//,
/^\.sass-cache\//, /^\.sass-cache\//,
/^\.git\//, /^\.git\//,
/^\.gitignore$/, /^\.gitignore$/,
/\.DS_Store/, /\.DS_Store/,
/^build\//,
/^\.rbenv-.*$/, /^\.rbenv-.*$/,
/^Gemfile$/, /^Gemfile$/,
/^Gemfile\.lock$/, /^Gemfile\.lock$/,
@ -36,6 +36,10 @@ module Middleman
files.reload_path(config[:data_dir]) files.reload_path(config[:data_dir])
end end
app.after_configuration do
config[:file_watcher_ignore] << %r{^#{config[:build_dir]}\/}
end
# After config, load everything else # After config, load everything else
app.ready do app.ready do
files.reload_path('.') files.reload_path('.')