lib/templater/cli/generator.rb in templater-0.3.0 vs lib/templater/cli/generator.rb in templater-0.3.1
- old
+ new
@@ -71,10 +71,15 @@
puts "Generating with #{@generator_name} generator (just pretending):"
else
puts "Generating with #{@generator_name} generator:"
end
step_through_templates
+
+ # Run hooks
+ @generator.after_run
+ @generator.after_generation unless @options[:delete]
+ @generator.after_deletion if @options[:delete]
end
def step_through_templates
@generator.all_actions.each do |action|
if @options[:delete]
@@ -163,11 +168,8 @@
say "<%= color('+ #{diff.element.chomp}', :green) %>"
else
say "#{diff.action} #{diff.element.chomp}"
end
end
-
end
-
end
-
-end
\ No newline at end of file
+end