I’d like call the build task within an extension. Currently I do this like:
builder = ::Middleman::Cli::Build.new
builder.build
My problem is that this seems to run build
with instrument
set to true
. With middleman 3.0.x this causes an error (as does middleman build --instrument
). With middleman 3.1.x there is no error but instrument is still set to true.
To work around this I do this instead:
builder = ::Middleman::Cli::Build.new(args=[], options={:instrument=>false})
builder.build
This seems to say to me that I’m doing something wrong. How should I call the build task within an extension?
Thanks.
-Tom