lib/jsduck/web/writer.rb in jsduck-5.2.0 vs lib/jsduck/web/writer.rb in jsduck-5.3.0

- old
+ new

@@ -1,9 +1,10 @@ require 'jsduck/exporter/app' require 'jsduck/format/batch' require 'jsduck/class_writer' require 'jsduck/inline_examples' +require 'jsduck/output_dir' require 'jsduck/web/template' require 'jsduck/web/index_html' require 'jsduck/web/data' require 'jsduck/web/css' require 'jsduck/web/source' @@ -21,10 +22,12 @@ @parsed_files = parsed_files @opts = opts end def write + clean_output_dir + write_template_files write_member_icons write_html_files @@ -40,12 +43,15 @@ write_classes @assets.write end - # Clean output dir and copy over template files + def clean_output_dir + OutputDir.clean(@opts) + end + + # Copy over template files def write_template_files - FileUtils.rm_rf(@opts.output_dir) Web::Template.new(@opts).write end # Copy over member icons def write_member_icons