Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
syntacticx committed Mar 8, 2009
1 parent 546a2fb commit d08d25d
Show file tree
Hide file tree
Showing 86 changed files with 4,638 additions and 7,367 deletions.
16 changes: 10 additions & 6 deletions build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def append_file_contents_to_target_file_without_license(file_contents,target_fil
end
end

def format_example(example)
RDiscount.new(example).to_html
end

parsed_json = JSON.parse(File.read(File.join(File.dirname(__FILE__),'build.json')))

parsed_json.each do |target|
Expand Down Expand Up @@ -57,7 +61,7 @@ def append_file_contents_to_target_file_without_license(file_contents,target_fil
end

if ARGV.include?('documentation')
`cd extensions/docs; ./make_docs.sh ~/Documents/workspace/com.aptana.sdoc; cd ..; cd ..;`
puts `cd extensions/docs; ./make_docs.sh ~/Documents/workspace/com.aptana.sdoc; cd ..; cd ..;`
end

if ARGV.include?('website')
Expand All @@ -66,15 +70,15 @@ def append_file_contents_to_target_file_without_license(file_contents,target_fil
examples = {}
doc.root.each_element('class/examples/example') do |example|
key = example.parent.parent.attributes['type'].gsub(/\..+$/,'').gsub(/^Active/,'').downcase
if examples.has_key?(key)
if !examples.has_key?(key)
examples[key] = example.text
else
example.text += "\n" + example.text
examples[key] += "\n" + example.text
end
end
examples.each do |key,example|
source = File.read('ext/website/index.html')
target = File.new("ext/website/#{key}.html")
target.write(source.gsub(/\<\!\-\- CONTENT \-\-\>.+\<\!\-\- \/CONTENT \-\-\>/,RDiscount.new(example).to_html))
source = File.read('extensions/website/index.html')
target = File.new("extensions/website/#{key}.html",'w+')
target.write(source[0,source.index('<!-- CONTENT -->')] + format_example(example) + source[source.index('<!-- /CONTENT -->') + 17,source.length])
end
end
20 changes: 0 additions & 20 deletions docs/ActiveEvent.ObservableObject.html

This file was deleted.

147 changes: 0 additions & 147 deletions docs/ActiveEvent.html

This file was deleted.

5 changes: 0 additions & 5 deletions docs/ActiveJS.index-toc.html

This file was deleted.

Loading

0 comments on commit d08d25d

Please sign in to comment.