Skip to content

Commit

Permalink
Fixed doc building
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Spencer committed Sep 9, 2009
1 parent f375dc7 commit 2c6ba9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
33 changes: 11 additions & 22 deletions scripts/builders/docs_builder.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
module ExtMVC
class DocsBuilder < Builder
def initialize(args)

def self.instances(args = [])
[ExtMVC::DocsBuilder.new]
end


end
end

def build
system("java -jar vendor/ext-doc/ext-doc.jar -p config/build.xml -o docs -t vendor/ext-doc/template/ext/template.xml -verbose")
app_name = ExtMVC.settings['docs']['title'] rescue ExtMVC.environment["namespace"] || "Ext MVC"
logo = ExtMVC.settings['docs']['logo'] rescue "resources/extjs.gif"

# Builds documentation
def self.docs
system("java -jar vendor/ext-doc/ext-doc.jar -p config/build.xml -o docs -t vendor/ext-doc/template/ext/template.xml -verbose")
app_name = ExtMVC.settings['docs']['title'] rescue ExtMVC.environment["namespace"] || "Ext MVC"
logo = ExtMVC.settings['docs']['logo'] rescue "resources/extjs.gif"

{:app_name => app_name, :logo => logo}.each_pair do |key, value|
ExtMVC.gsub_file("docs/index.html", "<%= @#{key} %>", value)
ExtMVC.gsub_file("docs/welcome.html", "<%= @#{key} %>", value)
{:app_name => app_name, :logo => logo}.each_pair do |key, value|
ExtMVC.gsub_file("docs/index.html", "<%= @#{key} %>", value)
ExtMVC.gsub_file("docs/welcome.html", "<%= @#{key} %>", value)
end
end
end
end

def self.docs_auto
filename = 'myindex.html'
command = "ruby script/build docs"

self.listen_to_file_and_run(filename, command, "Built Ext MVC app documentation")
end
1 change: 1 addition & 0 deletions scripts/scripts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require 'vendor/mvc/scripts/builders/app_builder'
require 'vendor/mvc/scripts/builders/css_builder'
require 'vendor/mvc/scripts/builders/all_builder'
require 'vendor/mvc/scripts/builders/docs_builder'

require 'vendor/mvc/scripts/generator'
require 'vendor/mvc/scripts/plugin'
Expand Down

0 comments on commit 2c6ba9e

Please sign in to comment.