Sha256: c0b0427f5eff114b413ba5b2508ce5da57166262547296313d88c875316b4e66

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

module Distil

  require "#{VENDOR_DIR}/pdoc/lib/pdoc"
  
  class PDocProduct < Product

    option :pdoc_template, "#{VENDOR_DIR}/pdoc-template"
    option :doc_folder, Interpolated, "$(path)/doc"

    extension "js"
    
    def filename
      File.join(doc_folder, 'index.html')
    end
    
    def write_output
      return if up_to_date
      @up_to_date= true

      PDoc.run({
        :source_files => files,
        :destination => doc_folder,
        :templates => pdoc_template,
        :syntax_highlighter => :pygments,
        :markdown_parser => :bluecloth,
        # :src_code_href => proc { |entity|
        #   "http://github.com/example/ex/#{entity.file}##{entity.line_number}"
        # },
        :pretty_urls => true,
        :bust_cache => true,
        :name => 'Example JavaScript Framework',
        :short_name => 'Ex',
        :home_url => 'http://example.com',
        :doc_url => 'http://example.com/api',
        :version => "1.2.0",
        :copyright_notice => 'This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.' 
      })
    end
    
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
distil-0.13.6 lib/distil/product/pdoc-product.rb
distil-0.13.5 lib/distil/product/pdoc-product.rb
distil-0.13.4 lib/distil/product/pdoc-product.rb
distil-0.13.3 lib/distil/product/pdoc-product.rb
distil-0.13.2 lib/distil/product/pdoc-product.rb
distil-0.13.1 lib/distil/product/pdoc-product.rb
distil-0.13.0 lib/distil/product/pdoc-product.rb