Loading Rakefile +28 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,19 @@ class JsDuckRunner ] end def add_doctest @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"> Loading Loading @@ -380,6 +393,21 @@ task :ext4, [:mode] => :sass do |t, args| runner.run end desc "Run JSDuck with example test hacks\n" + "doctest - creates debug/development version\n" + "doctest[export] - creates export/deployable version\n" task :doctest, [:mode] => :sass do |t, args| mode = args[:mode] || "debug" throw "Unknown mode #{mode}" unless ["debug", "export"].include?(mode) compress if mode == "export" runner = JsDuckRunner.new runner.add_doctest runner.add_debug if mode == "debug" runner.add_seo runner.run end desc "Run JSDuck on official Ext JS 3.4 build\n" + "ext3 - creates debug/development version\n" + "ext3[export] - creates export/deployable version\n" Loading lib/jsduck/app_data.rb +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ module JsDuck :examples => @assets.examples.to_array, :search => SearchData.new.create(@relations.classes, @assets), :stats => @opts.stats ? Stats.new.create(@relations.classes) : [], :doctests => @relations.classes.collect {|cls| cls[:name]}, :signatures => MetaTagRegistry.instance.signatures, :localStorageDb => @opts.local_storage_db, :showPrintButton => @opts.seo, Loading lib/jsduck/options.rb +6 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ module JsDuck attr_accessor :seo attr_accessor :eg_iframe attr_accessor :examples_base_url attr_accessor :doctests # Debugging attr_accessor :processes Loading Loading @@ -97,6 +98,7 @@ module JsDuck @seo = false @eg_iframe = nil @examples_base_url = "extjs-build/examples/" @doctests = false # Debugging # Turn multiprocessing off by default in Windows Loading Loading @@ -284,6 +286,10 @@ module JsDuck @examples_base_url = path end opts.on('--doctests', "Creates infrastructure for running tests. Experimental!", " ") do @doctests = true end opts.separator "Debugging:" opts.separator "" Loading template/app/Application.js +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ Ext.define('Docs.Application', { 'Guides', 'Videos', 'Stats', 'Tabs' 'Tabs', 'DocTests' ], launch: function() { Loading template/app/Assert.js 0 → 100644 +17 −0 Original line number Diff line number Diff line /** * Assertions for use by DocTests. */ Ext.define('Docs.Assert', { singleton: true, assert: function(value, message) { if (!value) { if (Ext.isEmpty(message)) { message = 'value expected to be truthy: ' + value.toString(); } var e = new Error(message); e.docAssertFailed = true; throw e; } } }); Loading
Rakefile +28 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,19 @@ class JsDuckRunner ] end def add_doctest @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"> Loading Loading @@ -380,6 +393,21 @@ task :ext4, [:mode] => :sass do |t, args| runner.run end desc "Run JSDuck with example test hacks\n" + "doctest - creates debug/development version\n" + "doctest[export] - creates export/deployable version\n" task :doctest, [:mode] => :sass do |t, args| mode = args[:mode] || "debug" throw "Unknown mode #{mode}" unless ["debug", "export"].include?(mode) compress if mode == "export" runner = JsDuckRunner.new runner.add_doctest runner.add_debug if mode == "debug" runner.add_seo runner.run end desc "Run JSDuck on official Ext JS 3.4 build\n" + "ext3 - creates debug/development version\n" + "ext3[export] - creates export/deployable version\n" Loading
lib/jsduck/app_data.rb +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ module JsDuck :examples => @assets.examples.to_array, :search => SearchData.new.create(@relations.classes, @assets), :stats => @opts.stats ? Stats.new.create(@relations.classes) : [], :doctests => @relations.classes.collect {|cls| cls[:name]}, :signatures => MetaTagRegistry.instance.signatures, :localStorageDb => @opts.local_storage_db, :showPrintButton => @opts.seo, Loading
lib/jsduck/options.rb +6 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ module JsDuck attr_accessor :seo attr_accessor :eg_iframe attr_accessor :examples_base_url attr_accessor :doctests # Debugging attr_accessor :processes Loading Loading @@ -97,6 +98,7 @@ module JsDuck @seo = false @eg_iframe = nil @examples_base_url = "extjs-build/examples/" @doctests = false # Debugging # Turn multiprocessing off by default in Windows Loading Loading @@ -284,6 +286,10 @@ module JsDuck @examples_base_url = path end opts.on('--doctests', "Creates infrastructure for running tests. Experimental!", " ") do @doctests = true end opts.separator "Debugging:" opts.separator "" Loading
template/app/Application.js +2 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,8 @@ Ext.define('Docs.Application', { 'Guides', 'Videos', 'Stats', 'Tabs' 'Tabs', 'DocTests' ], launch: function() { Loading
template/app/Assert.js 0 → 100644 +17 −0 Original line number Diff line number Diff line /** * Assertions for use by DocTests. */ Ext.define('Docs.Assert', { singleton: true, assert: function(value, message) { if (!value) { if (Ext.isEmpty(message)) { message = 'value expected to be truthy: ' + value.toString(); } var e = new Error(message); e.docAssertFailed = true; throw e; } } });