Execute Ruby file after build

Hello Everybody.

I like middleman and I’m using middleman a few years.

My question is:

I wanna call one ruby file after build, I’m using the code below:

class MyFeature < Middleman::Extension
def initialize(app, options_hash={}, &block)
super
app.after_build do |builder|
builder.run ‘./minify.rb’
end
end
end

But the code isn’t executed, someone had the same problem or can help me?

Thanks :slight_smile:

Would you need to activate: it in config.rb?

Try this:

app.after_build do
  system './minify.rb'
end

Though I wonder, why do you need to run minify as a separate task? We already have minification support.