DIR = File.dirname(__FILE__)
OUTPUT_DIR = File.expand_path(File.join(DIR, "..", "output"))
TEMPLATES_DIR = File.expand_path(File.join(DIR, "..", "templates"))
PARSER_DIR = File.expand_path(File.join(DIR, "pdoc", "parser"))
VENDOR_DIR = File.expand_path(File.join(DIR, "..", "vendor"))

[DIR, VENDOR_DIR, PARSER_DIR, OUTPUT_DIR, TEMPLATES_DIR].each do |c|
  $:.unshift File.expand_path(c)
end

require 'erb'
require 'fileutils'

require File.expand_path(File.join(DIR, "pdoc", "runner"))
require File.expand_path(File.join(DIR, "pdoc", "generators"))
require File.expand_path(File.join(DIR, "pdoc", "parser"))

module PDoc
  def self.copy_templates(template_type, destination)
    dir = File.expand_path(destination)
    raise "File already exists: #{destination}" if File.exist?(dir)
    FileUtils.cp_r("#{TEMPLATES_DIR}/#{template_type}", dir)
  end
end

DIR = File.expand_path(File.dirname(__FILE__))
OUTPUT_DIR    = File.join(DIR, '..', 'output')
TEMPLATES_DIR = File.join(DIR, '..', 'templates')
VENDOR_DIR    = File.join(DIR, '..', 'vendor')
PARSER_DIR    = File.join(DIR, 'pdoc', 'parser')

[DIR, VENDOR_DIR, PARSER_DIR, OUTPUT_DIR, TEMPLATES_DIR].each do |c|
  $:.unshift(c)
end

require 'rubygems'
require 'erb'
require 'fileutils'

require 'pdoc/runner'
require 'pdoc/generators'
require 'pdoc/parser'

module PDoc
  def self.copy_templates(template_type, destination)
    dir = File.expand_path(destination)
    raise "File already exists: #{destination}" if File.exist?(dir)
    FileUtils.cp_r("#{TEMPLATES_DIR}/#{template_type}", dir)
  end
end

Clean up internal requires and external dependencies.
Clean up internal requires and external dependencies.
