lib/jsduck/options.rb in jsduck-4.9.0 vs lib/jsduck/options.rb in jsduck-4.10.0
- old
+ new
@@ -38,10 +38,11 @@
attr_accessor :eg_iframe
attr_accessor :examples_base_url
attr_accessor :tests
attr_accessor :comments_url
attr_accessor :comments_domain
+ attr_accessor :search
attr_accessor :ignore_html
# Debugging
attr_accessor :warnings_exit_nonzero
attr_accessor :template_dir
@@ -91,11 +92,11 @@
"Mixed",
]
@ext4_events = nil
@meta_tag_paths = []
- @version = "4.9.0"
+ @version = "4.10.0"
# Customizing output
@title = "Documentation - JSDuck"
@header = "<strong>Documentation</strong> JSDuck"
@footer = format_footer("Generated on {DATE} by {JSDUCK} {VERSION}.")
@@ -118,10 +119,11 @@
@eg_iframe = nil
@examples_base_url = "extjs-build/examples/"
@tests = false
@comments_url = nil
@comments_domain = nil
+ @search = {}
@ignore_html = {}
# Debugging
@warnings_exit_nonzero = false
@root_dir = File.dirname(File.dirname(File.dirname(__FILE__)))
@@ -424,15 +426,48 @@
"Must be used together with --comments-domain option.") do |url|
@comments_url = url
end
opts.on('--comments-domain=STRING',
+ "A name identifying the subset of comments.",
+ "",
"A string consisting of <name>/<version>.",
"",
"For example: ext-js/4",
"",
"Must be used together with --comments-url option.") do |domain|
@comments_domain = domain
+ end
+
+ opts.on('--search-url=URL',
+ "Address of guides search server.",
+ "",
+ "When supplied, the search for guides is performed through this",
+ "external service and the results merged together with API search.",
+ "The search server must respond to JSONP requests.",
+ "",
+ "For example: http://sencha.com/docsearch",
+ "",
+ "Must be used together with --search-domain option.",
+ "",
+ "This option is EXPERIMENTAL.") do |url|
+ @search[:url] = url
+ end
+
+ opts.on('--search-domain=STRING',
+ "A name identifying the subset to search from.",
+ "",
+ "A string consisting of <name>/<version>.",
+ "",
+ "Tells the search engine which product and version",
+ "to include into search.",
+ "",
+ "For example: Ext JS/4.2.0",
+ "",
+ "Must be used together with --search-url option.",
+ "",
+ "This option is EXPERIMENTAL.") do |domain|
+ @search[:product], @search[:version] = domain.split(/\//)
end
opts.separator ""
opts.separator "Tweaking:"
opts.separator ""