Commit 802426bf authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Add --ext4-events command line option.

With help of this option JSDuck is able to generate both Ext3 and Ext4
documentation.
parent efccbd25
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ def run_jsduck(extra_options)
    "ruby", "bin/jsduck",
    # --external=Error to ignore the Error class that Ext.Error extends.
    "--external", "Error",
    "--ext4-events",
    "--guides", "#{SDK_DIR}/guides",
    "--guides-order", "getting,class,application,layouts,data,grid,tree,drawing,forms,components,theming,direct",
    "--categories", "#{SDK_DIR}/extjs/doc-resources/categories.json",
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,12 @@ opts = OptionParser.new do | opts |
    app.output_dir = path
  end

  opts.on('--ext4-events',
    "Appends extra options parameter to each event that is",
    "automatically added by ExtJS 4.", " ") do
    app.ignore_global = true
  end

  opts.on('--ignore-global', "Turns off the creation of global class.", " ") do
    app.ignore_global = true
  end
+3 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ module JsDuck
    attr_accessor :footer
    attr_accessor :extjs_path
    attr_accessor :append_html
    attr_accessor :ext4_events

    def initialize
      @output_dir = nil
@@ -61,6 +62,7 @@ module JsDuck
      @footer = 'Generated with <a href="https://github.com/nene/jsduck">JSDuck</a>.'
      @extjs_path = "extjs/ext-all.js"
      @append_html = ""
      @ext4_events = false
      @timer = Timer.new
      @parallel = ParallelWrap.new
    end
@@ -149,7 +151,7 @@ module JsDuck
      end
      agr.classify_orphans
      agr.create_global_class unless @ignore_global
      agr.append_ext4_event_options
      agr.append_ext4_event_options if @ext4_events
      agr.result
    end