lib/barista.rb in barista-0.5.0 vs lib/barista.rb in barista-0.5.1

- old
+ new

@@ -32,13 +32,21 @@ def on_compilation(&blk) on_hook :compiled, &blk end + def on_compilation_complete(&blk) + on_hook :all_compiled, &blk + end + def on_compilation_with_warning(&blk) on_hook :compiled_with_warning, &blk end + + def before_full_compilation(&blk) + on_hook :before_full_compilation, &blk + end def before_compilation(&blk) on_hook :before_compilation, &blk end @@ -99,12 +107,14 @@ "" end def compile_all!(force = false, silence_error = true) debug "Compiling all coffeescripts" + Barista.invoke_hook :before_full_compilation Framework.exposed_coffeescripts.each do |coffeescript| compile_file! coffeescript, force, silence_error end + Barista.invoke_hook :all_compiled true end def change_output_prefix!(framework, prefix = nil) framework = framework.is_a?(Barista::Framework) ? framework : Barista::Framework[framework]