Permalink
Browse files

get pdoc to compile again

  • Loading branch information...
1 parent a1771b2 commit 45d7388bf235138f72ba3dae77e2871470be42b8 @josh josh committed Mar 3, 2009
View
@@ -70,10 +70,21 @@ task :doc => 'doc:build'
namespace :doc do
desc "Builds the documentation"
task :build => [:update_submodules, :clean] do
+ require File.join(WYSIHAT_ROOT, "vendor", "sprockets", "lib", "sprockets")
require File.join(WYSIHAT_ROOT, "vendor", "pdoc", "lib", "pdoc")
- files = Dir["#{File.expand_path(File.dirname(__FILE__))}/src/**/*.js"]
- files << { :output => WYSIHAT_DOC_DIR }
- PDoc::Runner.new(*files).run
+ require 'tempfile'
+
+ Tempfile.open("pdoc") do |temp|
+ secretary = Sprockets::Secretary.new(
+ :root => File.join(WYSIHAT_ROOT, "src"),
+ :load_path => [WYSIHAT_SRC_DIR],
+ :source_files => ["wysihat.js"],
+ :strip_comments => false
+ )
+
+ secretary.concatenation.save_to(temp.path)
+ PDoc::Runner.new(temp.path, :output => WYSIHAT_DOC_DIR).run
+ end
end
task :publish => :build do
View
@@ -5,7 +5,11 @@
*--------------------------------------------------------------------------*/
/**
- * namespace WysiHat
+ * == wysihat ==
+**/
+
+/** section: wysihat
+ * WysiHat
**/
var WysiHat = {};
View
@@ -1,2 +1,7 @@
+/**
+ * == dom ==
+ * DOM extensions.
+**/
+
//= require "dom/range"
//= require "dom/selection"
@@ -1,6 +1,6 @@
/** section: dom
* class WysiHat.Selection
- **/
+**/
WysiHat.Selection = Class.create((function() {
/**
* new WysiHat.Selection(editor)
View
@@ -1,8 +1,8 @@
-/** section: editor
- * WysiHat.Editor
+/** section: wysihat
+ * WysiHat.Editor
**/
WysiHat.Editor = {
- /** section: editor
+ /** section: wysihat
* WysiHat.Editor.attach(textarea) -> undefined
* - textarea (String | Element): an id or DOM node of the textarea that
* you want to convert to rich text.
@@ -41,7 +41,7 @@ WysiHat.Editor = {
});
},
- /** section: editor
+ /** section: wysihat
* WysiHat.Editor.include(module) -> Array
* - module (Object): an object that will extend each editor element.
*
@@ -1,4 +1,4 @@
-/** section: editor
+/** section: wysihat
* mixin WysiHat.Commands
*
* Methods will be mixed into the editor element. Most of these
@@ -1,4 +1,4 @@
-/** section: editor
+/** section: wysihat
* mixin WysiHat.Events
*
* Forwards common DOM events to the editor element. All events are
@@ -1,4 +1,4 @@
-/** section: editor
+/** section: wysihat
* mixin WysiHat.Persistence
*
* Methods will be mixed into the editor element. These methods deal with
@@ -1,4 +1,4 @@
-/** section: editor
+/** section: wysihat
* mixin WysiHat.Window
*
* Methods will be mixed into the editor element. These methods handle window
@@ -1,5 +1,5 @@
-/** section: models
- * WysiHat.Editable
+/** section: wysihat
+ * WysiHat.Editable
* includes WysiHat.Commands, WysiHat.Persistence, WysiHat.Window, WysiHat.Editable.Methods
**/
WysiHat.Editable = {
@@ -22,8 +22,8 @@ WysiHat.Editable = {
}
};
-/** section: models
- * WysiHat.Editable.Methods
+/** section: wysihat
+ * mixin WysiHat.Editable.Methods
**/
WysiHat.Editable.Methods = {
getDocument: function() {
@@ -1,5 +1,5 @@
-/** section: models
- * WysiHat.iFrame
+/** section: wysihat
+ * WysiHat.iFrame
* includes WysiHat.Commands, WysiHat.Persistence, WysiHat.Window, WysiHat.iFrame.Methods
**/
WysiHat.iFrame = {
@@ -16,8 +16,8 @@ WysiHat.iFrame = {
}
};
-/** section: models
- * WysiHat.iFrame.Methods
+/** section: wysihat
+ * mixin WysiHat.iFrame.Methods
**/
WysiHat.iFrame.Methods = {
attach: function(element, callback) {
View
@@ -1,4 +1,4 @@
-/** section: toolbar
+/** section: wysihat
* class WysiHat.Toolbar
**/
WysiHat.Toolbar = Class.create((function() {
@@ -1,5 +1,5 @@
-/** section: toolbar
- * namespace WysiHat.Toolbar.ButtonSets
+/**
+ * WysiHat.Toolbar.ButtonSets
*
* A namespace for various sets of Toolbar buttons. These sets should be
* compatible with WysiHat.Toolbar, and can be added to the toolbar with:
@@ -8,7 +8,7 @@
WysiHat.Toolbar.ButtonSets = {};
/**
- * WysiHat.Toolbar.ButtonSets.Basic
+ * WysiHat.Toolbar.ButtonSets.Basic
*
* A basic set of buttons: bold, underline, and italic. This set is
* compatible with WysiHat.Toolbar, and can be added to the toolbar with:

0 comments on commit 45d7388

Please sign in to comment.