Commit f13ab7b2 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix :ext4 task and reuse it in :doctests task.

parent b97c73c6
Loading
Loading
Loading
Loading
+4 −16
Original line number Diff line number Diff line
@@ -177,9 +177,9 @@ class JsDuckRunner
  def add_ext4
    @options += [
      "--title", "Sencha Docs - Ext JS 4.0",
      "--footer", "Ext JS 4.0 Docs - Generated with <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> VERSION. <a href='http://www.sencha.com/legal/terms-of-use/'>Terms of Use</a>",
      "--footer", "Ext JS 4.0 Docs - Generated with <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> {VERSION}. <a href='http://www.sencha.com/legal/terms-of-use/'>Terms of Use</a>",
      "--ignore-global",
      "--no-warnings",
      "--warnings", "-all",
      "--images", "#{EXT_BUILD}/docs/doc-resources",
      "--local-storage-db", "ext-4",
      "--output", "#{OUT_DIR}",
@@ -187,19 +187,6 @@ class JsDuckRunner
    ]
  end

  def add_doctests
    @options += [
      "--title", "Sencha Docs - Ext JS 4.0",
      "--footer", "Ext JS 4.0 Docs - Generated with <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> VERSION. <a href='http://www.sencha.com/legal/terms-of-use/'>Terms of Use</a>",
      "--ignore-global",
      "--images", "#{OUT_DIR}/docs/doc-resources",
      "--local-storage-db", "ext-4",
      "--output", "#{OUT_DIR}",
      "#{EXT_BUILD}/src",
      "--doctests"
    ]
  end

  def add_phone_redirect
    @options += ["--body-html", <<-EOHTML]
      <script type="text/javascript">
@@ -396,7 +383,8 @@ end
desc "Run JSDuck with example test hacks"
task :doctests => :sass do |t, args|
  runner = JsDuckRunner.new
  runner.add_doctests
  runner.add_ext4
  runner.add_options(["--doctests"])
  runner.add_debug
  runner.add_seo
  runner.run