Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update PDoc.

  • Loading branch information...
commit 60c59846e6556d0b71fdcd253c09d51ad767be09 1 parent fc14b26
@tobie tobie authored committed
Showing with 16 additions and 21 deletions.
  1. +2 −1  .gitignore
  2. +13 −19 Rakefile
  3. +1 −1  vendor/pdoc
View
3  .gitignore
@@ -2,4 +2,5 @@
pkg
test/unit/tmp/*
doc
-tmp
+tmp
+*.pdoc.yaml
View
32 Rakefile
@@ -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]
2  vendor/pdoc
@@ -1 +1 @@
-Subproject commit 472a55dd0019acf034d4f72522915a5e9efd0a1a
+Subproject commit 14c5c89e0147376563370e5925eeccc80990f202
Please sign in to comment.
Something went wrong with that request. Please try again.