Loading Rakefile +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ def run_jsduck(extra_options) "--external", "Error", "--guides", "#{SDK_DIR}/guides/guides.json", "--videos", "#{SDK_DIR}/guides/videos.json", "--examples", "#{SDK_DIR}/extjs/doc-resources", "--inline-examples", "#{SDK_DIR}/extjs/doc-resources", "--categories", "#{SDK_DIR}/extjs/doc-resources/categories.json", "--output", "#{OUT_DIR}", ].concat(extra_options)) Loading lib/jsduck/app.rb +3 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,9 @@ module JsDuck formatter.link_tpl = @opts.link_tpl if @opts.link_tpl formatter.img_tpl = @opts.img_tpl if @opts.img_tpl formatter.relations = @relations formatter.get_example = lambda {|path| IO.read(@opts.examples_dir + "/" + path) } if @opts.examples_dir if @opts.inline_examples_dir formatter.get_example = lambda {|path| IO.read(@opts.inline_examples_dir + "/" + path) } end formatter end Loading lib/jsduck/options.rb +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ module JsDuck attr_accessor :guides attr_accessor :videos attr_accessor :categories_path attr_accessor :examples_dir attr_accessor :inline_examples_dir attr_accessor :pretty_json attr_accessor :link_tpl attr_accessor :img_tpl Loading Loading @@ -52,7 +52,7 @@ module JsDuck @guides = nil @videos = nil @categories_path = nil @examples_dir = nil @inline_examples_dir = nil @pretty_json = false @link_tpl = '<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' # Note that we wrap image template inside <p> because {@img} often Loading Loading @@ -148,8 +148,8 @@ module JsDuck @categories_path = path end opts.on('--examples=PATH', "Path to examples directory.", " ") do |path| @examples_dir = path opts.on('--inline-examples=PATH', "Path to inline examples directory.", " ") do |path| @inline_examples_dir = path end opts.on('--pretty-json', "Turn on pretty-printing of JSON.", " ") do Loading Loading
Rakefile +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ def run_jsduck(extra_options) "--external", "Error", "--guides", "#{SDK_DIR}/guides/guides.json", "--videos", "#{SDK_DIR}/guides/videos.json", "--examples", "#{SDK_DIR}/extjs/doc-resources", "--inline-examples", "#{SDK_DIR}/extjs/doc-resources", "--categories", "#{SDK_DIR}/extjs/doc-resources/categories.json", "--output", "#{OUT_DIR}", ].concat(extra_options)) Loading
lib/jsduck/app.rb +3 −1 Original line number Diff line number Diff line Loading @@ -175,7 +175,9 @@ module JsDuck formatter.link_tpl = @opts.link_tpl if @opts.link_tpl formatter.img_tpl = @opts.img_tpl if @opts.img_tpl formatter.relations = @relations formatter.get_example = lambda {|path| IO.read(@opts.examples_dir + "/" + path) } if @opts.examples_dir if @opts.inline_examples_dir formatter.get_example = lambda {|path| IO.read(@opts.inline_examples_dir + "/" + path) } end formatter end Loading
lib/jsduck/options.rb +4 −4 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ module JsDuck attr_accessor :guides attr_accessor :videos attr_accessor :categories_path attr_accessor :examples_dir attr_accessor :inline_examples_dir attr_accessor :pretty_json attr_accessor :link_tpl attr_accessor :img_tpl Loading Loading @@ -52,7 +52,7 @@ module JsDuck @guides = nil @videos = nil @categories_path = nil @examples_dir = nil @inline_examples_dir = nil @pretty_json = false @link_tpl = '<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' # Note that we wrap image template inside <p> because {@img} often Loading Loading @@ -148,8 +148,8 @@ module JsDuck @categories_path = path end opts.on('--examples=PATH', "Path to examples directory.", " ") do |path| @examples_dir = path opts.on('--inline-examples=PATH', "Path to inline examples directory.", " ") do |path| @inline_examples_dir = path end opts.on('--pretty-json', "Turn on pretty-printing of JSON.", " ") do Loading