Loading lib/jsduck/index_html.rb +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ module JsDuck "{header}" => @opts.header, "{footer}" => "<div id='footer-content' style='display: none'>#{@opts.footer}</div>", "{extjs_path}" => @opts.extjs_path, "{data_path}" => File.basename(@opts.data_path), "{welcome}" => @assets.welcome.to_html("display:none"), "{categories}" => @assets.categories.to_html("display:none"), "{guides}" => @assets.guides.to_html("display:none"), Loading lib/jsduck/options.rb +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ module JsDuck attr_accessor :template_dir attr_accessor :template_links attr_accessor :extjs_path attr_accessor :data_path attr_accessor :local_storage_db attr_accessor :touch_examples_ui attr_accessor :ext_namespaces Loading Loading @@ -113,6 +114,7 @@ module JsDuck @template_dir = @root_dir + "/template-min" @template_links = false @extjs_path = "extjs/ext-all.js" @data_path = nil # This gets assigned in JsDuck::WebWriter after writing the data file. @local_storage_db = "docs" @touch_examples_ui = false @ext_namespaces = ["Ext"] Loading lib/jsduck/web_writer.rb +10 −2 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ require 'jsduck/app_data' require 'jsduck/class_writer' require 'jsduck/source/writer' require 'jsduck/inline_examples' require 'jsduck/util/md5' require 'fileutils' module JsDuck Loading @@ -24,6 +25,7 @@ module JsDuck write_template_files write_app_data write_index_html # class-formatting is done in parallel which breaks the links # between source files and classes. Therefore it MUST to be done Loading @@ -40,11 +42,17 @@ module JsDuck def write_template_files TemplateDir.new(@opts).write IndexHtml.new(@assets, @opts).write end def write_app_data AppData.new(@relations, @assets, @opts).write(@opts.output_dir+"/data.js") filename = @opts.output_dir+"/data.js" AppData.new(@relations, @assets, @opts).write(filename) # Rename the file and remember the name for use in IndexHtml.write @opts.data_path = Util::MD5.rename(filename) end def write_index_html IndexHtml.new(@assets, @opts).write end def write_source Loading template/template.html +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ </script> <script type="text/javascript" src="{extjs_path}"></script> <script type="text/javascript" src="data.js"></script> <script type="text/javascript" src="{data_path}"></script> <!-- BEGIN JS --> <script type="text/javascript" src="resources/codemirror/codemirror.js"></script> Loading Loading
lib/jsduck/index_html.rb +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ module JsDuck "{header}" => @opts.header, "{footer}" => "<div id='footer-content' style='display: none'>#{@opts.footer}</div>", "{extjs_path}" => @opts.extjs_path, "{data_path}" => File.basename(@opts.data_path), "{welcome}" => @assets.welcome.to_html("display:none"), "{categories}" => @assets.categories.to_html("display:none"), "{guides}" => @assets.guides.to_html("display:none"), Loading
lib/jsduck/options.rb +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ module JsDuck attr_accessor :template_dir attr_accessor :template_links attr_accessor :extjs_path attr_accessor :data_path attr_accessor :local_storage_db attr_accessor :touch_examples_ui attr_accessor :ext_namespaces Loading Loading @@ -113,6 +114,7 @@ module JsDuck @template_dir = @root_dir + "/template-min" @template_links = false @extjs_path = "extjs/ext-all.js" @data_path = nil # This gets assigned in JsDuck::WebWriter after writing the data file. @local_storage_db = "docs" @touch_examples_ui = false @ext_namespaces = ["Ext"] Loading
lib/jsduck/web_writer.rb +10 −2 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ require 'jsduck/app_data' require 'jsduck/class_writer' require 'jsduck/source/writer' require 'jsduck/inline_examples' require 'jsduck/util/md5' require 'fileutils' module JsDuck Loading @@ -24,6 +25,7 @@ module JsDuck write_template_files write_app_data write_index_html # class-formatting is done in parallel which breaks the links # between source files and classes. Therefore it MUST to be done Loading @@ -40,11 +42,17 @@ module JsDuck def write_template_files TemplateDir.new(@opts).write IndexHtml.new(@assets, @opts).write end def write_app_data AppData.new(@relations, @assets, @opts).write(@opts.output_dir+"/data.js") filename = @opts.output_dir+"/data.js" AppData.new(@relations, @assets, @opts).write(filename) # Rename the file and remember the name for use in IndexHtml.write @opts.data_path = Util::MD5.rename(filename) end def write_index_html IndexHtml.new(@assets, @opts).write end def write_source Loading
template/template.html +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ </script> <script type="text/javascript" src="{extjs_path}"></script> <script type="text/javascript" src="data.js"></script> <script type="text/javascript" src="{data_path}"></script> <!-- BEGIN JS --> <script type="text/javascript" src="resources/codemirror/codemirror.js"></script> Loading