Module: Flak::Template::Doc::Tasks

Defined in:
lib/flak/rake/templates/doc.rb

Class Method Summary collapse

Class Method Details

.extended(target) ⇒ Object



60
61
62
# File 'lib/flak/rake/templates/doc.rb', line 60

def self.extended target
  task_factory target
end

.task_factory(target) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/flak/rake/templates/doc.rb', line 66

def self.task_factory target
  settings = target.settings


  desc "Release documentation"     
  task :doc do
    docroot = File.join(settings[:root],'doc')
    Dir.chdir(docroot) do |d|
      site = Nanoc::Site.new(YAML.load_file('config.yaml'))
      site.config[:output_dir] =   settings[:doc_destination]  
      target.(site)
      puts "Compiling documentation site in #{settings[:doc_destination]}"
      site.compile
      puts "Done."
    end
  end
end