-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ed Spencer
committed
Sep 9, 2009
1 parent
f375dc7
commit 2c6ba9e
Showing
2 changed files
with
12 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters