Permalink
Browse files

Update PDoc.

  • Loading branch information...
1 parent 2f9bde3 commit d11f3173e6e767518e6348c2218e8c96c62e9c1a @tobie tobie committed Apr 7, 2010
Showing with 16 additions and 21 deletions.
  1. +2 −1 .gitignore
  2. +13 −19 Rakefile
  3. +1 −1 vendor/pdoc
View
@@ -2,4 +2,5 @@
pkg
test/unit/tmp/*
doc
-tmp
+tmp
+*.pdoc.yaml
View
@@ -65,29 +65,19 @@ module PrototypeHelper
end
def self.build_doc_for(file)
- mkdir_p TMP_DIR
- temp_path = File.join(TMP_DIR, "prototype.temp.js")
- sprocketize(
- :path => 'src',
- :source => file,
- :destination => temp_path,
- :selector_engine => ENV['SELECTOR_ENGINE'] || DEFAULT_SELECTOR_ENGINE,
- :strip_comments => false
- )
- rm_rf DOC_DIR
-
- highlighter = syntax_highlighter
- puts "Using syntax highlighter: #{highlighter}\n"
+ rm_rf(DOC_DIR)
+ mkdir_p(DOC_DIR)
PDoc.run({
- :source_files => [temp_path],
+ :source_files => Dir[File.join('src', '**', '*.js')],
:destination => DOC_DIR,
:index_page => 'README.markdown',
- :syntax_highlighter => highlighter,
- :markdown_parser => :bluecloth
+ :syntax_highlighter => syntax_highlighter,
+ :markdown_parser => :bluecloth,
+ :repository_url => "http://github.com/sstephenson/prototype/tree/#{current_head}/",
+ :pretty_urls => true,
+ :bust_cache => false
})
-
- rm_rf temp_path
end
def self.syntax_highlighter
@@ -103,7 +93,7 @@ module PrototypeHelper
def self.require_highlighter(name, verbose=false)
case name
when :pygments
- success = system("pygmentize -V")
+ success = system("pygmentize -V > /dev/null")
if !success && verbose
puts "\nYou asked to use Pygments, but I can't find the 'pygmentize' binary."
puts "To install, visit:\n"
@@ -194,6 +184,10 @@ module PrototypeHelper
exit
end
end
+
+ def self.current_head
+ `git show-ref --hash HEAD`.chomp
+ end
end
task :default => [:dist, :dist_helper, :package, :clean_package_source]
Submodule pdoc updated 49 files
+0 −95 CHANGELOG
+1 −1 LICENSE
+2 −2 bin/pdoc
+2 −0 lib/pdoc.rb
+2 −6 lib/pdoc/generators/abstract_generator.rb
+72 −77 lib/pdoc/generators/html/helpers.rb
+1 −0 lib/pdoc/generators/html/page.rb
+22 −36 lib/pdoc/generators/html/website.rb
+42 −0 lib/pdoc/models.rb
+25 −0 lib/pdoc/models/argument.rb
+53 −0 lib/pdoc/models/base.rb
+13 −0 lib/pdoc/models/callable.rb
+20 −0 lib/pdoc/models/class.rb
+11 −0 lib/pdoc/models/class_method.rb
+9 −0 lib/pdoc/models/class_property.rb
+9 −0 lib/pdoc/models/constant.rb
+14 −0 lib/pdoc/models/constructor.rb
+90 −0 lib/pdoc/models/container.rb
+50 −0 lib/pdoc/models/entity.rb
+11 −0 lib/pdoc/models/instance_method.rb
+9 −0 lib/pdoc/models/instance_property.rb
+10 −0 lib/pdoc/models/mixin.rb
+10 −0 lib/pdoc/models/namespace.rb
+20 −0 lib/pdoc/models/node.rb
+23 −0 lib/pdoc/models/root.rb
+15 −0 lib/pdoc/models/section.rb
+20 −0 lib/pdoc/models/signature.rb
+11 −0 lib/pdoc/models/utility.rb
+83 −248 lib/pdoc/parser/documentation_nodes.rb
+4 −0 lib/pdoc/parser/ebnf_expression_nodes.rb
+4 −1 lib/pdoc/parser/treetop_files/documentation.treetop
+83 −46 lib/pdoc/runner.rb
+72 −0 lib/pdoc/treemaker.rb
+8 −34 templates/html/assets/stylesheets/api.css
+1 −1 templates/html/index.erb
+3 −3 templates/html/item_index.js.erb
+2 −16 templates/html/layout.erb
+5 −5 templates/html/leaf.erb
+8 −28 templates/html/node.erb
+7 −7 templates/html/partials/class_relationships.erb
+2 −2 templates/html/partials/classes.erb
+1 −1 templates/html/partials/constructor.erb
+2 −2 templates/html/partials/method_signatures.erb
+4 −5 templates/html/partials/methodized_note.erb
+1 −1 templates/html/partials/namespaces.erb
+2 −2 templates/html/partials/related_utilities.erb
+4 −2 templates/html/partials/relationships.erb
+9 −8 templates/html/partials/title.erb
+1 −1 templates/html/section.erb

0 comments on commit d11f317

Please sign in to comment.