Commit 4d8176bc authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Add --version command line option. Finally.

At the moment just hard-coding the version, but I'd like to find
a better approach, so I could store the version number in only one
place, say, the gemspec file.
parent 0c2bd5ef
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -66,11 +66,12 @@ module JsDuck

      @warnings = true
      @verbose = false
      @version = "3.0.pre"

      # Customizing output
      @title = "Sencha Docs - Ext JS"
      @header = "<strong>Sencha Docs</strong> Ext JS"
      @footer = 'Generated with <a href="https://github.com/senchalabs/jsduck">JSDuck</a>.'
      @footer = 'Generated with <a href="https://github.com/senchalabs/jsduck">JSDuck</a> #{@version}.'
      @head_html = ""
      @body_html = ""
      @welcome = nil
@@ -262,6 +263,11 @@ module JsDuck
          puts opts
          exit
        end

        opts.on('--version', "Prints JSDuck version", " ") do
          puts "JSDuck " + @version
          exit
        end
      end
    end