Permalink
Browse files

setup pdoc

  • Loading branch information...
josh committed Jan 13, 2009
1 parent 511fb9c commit 111abd74ef75a5d7f06a76d2152112789a7022ae
Showing with 23 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +19 −0 Rakefile
  3. +1 −0 vendor/pdoc
View
@@ -0,0 +1,3 @@
+[submodule "vendor/pdoc"]
+ path = vendor/pdoc
+ url = git://github.com/tobie/pdoc.git
View
@@ -26,6 +26,25 @@ task :dist do
File.open(File.join(WYSIHAT_DIST_DIR, "wysihat.js"), 'w') { |f| f.write(output) }
end
+
+desc "Builds the documentation"
+task :build_doc do
+ require File.join(WYSIHAT_ROOT, "vendor", "pdoc", "lib", "pdoc")
+ output = File.expand_path(File.join(File.dirname(__FILE__), "output"))
+ files = Dir["#{File.expand_path(File.dirname(__FILE__))}/src/**/*.js"]
+ files << { :output => output }
+ PDoc::Runner.new(*files).run
+end
+
+desc "Empties output directory"
+task :remove_doc do
+ rm_rf Dir.glob(File.join(File.dirname(__FILE__), "output", "*"))
+end
+
+desc "Empties the output directory and builds the documentation."
+task :doc => [:remove_doc, :build_doc]
+
+
desc "Builds the distribution, runs the JavaScript unit tests and collects their results."
task :test => [:build_tests, :dist, :test_units]
Submodule pdoc added at 5d54c7

0 comments on commit 111abd7

Please sign in to comment.