Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,4 @@ template/extjs template/resources/css template/resources/sass/.sass-cache sdk-vars.rb Rakefile +39 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,43 @@ task :install => :build do system "gem install --user-install jsduck" end desc "Run JSDuck on ExtJS SDK" task :sdk do if File.exists?("sdk-vars.rb") require "sdk-vars.rb" else puts "Error: sdk-vars.rb not found." puts puts "Please create file sdk-vars.rb and define constants SDK_DIR and OUT_DIR in it." puts puts "For example:" puts puts " SDK_DIR='/path/to/SDK'" puts " OUT_DIR='/path/to/ouput/dir'" exit 1 end system [ "ruby bin/jsduck", # --external=Error to ignore the Error class that Ext.Error extends. "--external=Error", # to create symbolic links to template files instead of copying them over. # Useful for development. Turn off for deployment. "--template-links", '--link=\'<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>\'', # Note that we wrap image template inside <p> because {@img} often # appears inline withing text, but that just looks ugly in HTML '--img=\'<p><img src="doc-resources/%u" alt="%a"></p>\'', "--guides=#{SDK_DIR}/guides", "--output=#{OUT_DIR}", "#{SDK_DIR}/extjs/src", "#{SDK_DIR}/platform/src", "#{SDK_DIR}/platform/core/src" ].join(" ") # Finally copy over the images that documentation links to. system "cp -r #{SDK_DIR}/extjs/doc-resources #{OUT_DIR}/doc-resources" system "cp -r #{SDK_DIR}/platform/doc-resources/* #{OUT_DIR}/doc-resources" end task :default => :spec bin/jsduck +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ elsif File.exists?(app.output_dir) && !File.directory?(app.output_dir) puts "Oh noes! The output directory is not really a directory at all :(" exit(1) elsif !File.exists?(File.dirname(app.output_dir)) puts "Oh noes! The parent directory for #{output_dir} doesn't exist." puts "Oh noes! The parent directory for #{app.output_dir} doesn't exist." exit(1) elsif !File.exists?(app.template_dir + "/extjs") puts "Oh noes! The template directory does not contain extjs/ directory :(" Loading sdk.shdeleted 100755 → 0 +0 −31 Original line number Diff line number Diff line #/usr/bin/env bash # The Bash script I'm currently using to generate documentation from # latest ExtJS SDK. # Sorry, these are currently hard-coded :( SDK_DIR=~/work/SDK OUT_DIR=~/public_html/docs ruby bin/jsduck \ --template-links \ --external=Error \ --link='<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' \ --img='<p><img src="doc-resources/%u" alt="%a"></p>' \ --guides=$SDK_DIR/guides \ --output=$OUT_DIR \ $SDK_DIR/extjs/src $SDK_DIR/platform/src $SDK_DIR/platform/core/src # --template-links to create symbolic links to template files instead # of copying them over. Useful for development. Turn off for # deployment. # --external=Error to ignore the Error class that Ext.Error extends. # Note that we wrap image template inside <p> because {@img} often # appears inline withing text, but that just looks ugly in HTML # Finally copy over the images that documentation links to. cp -r $SDK_DIR/extjs/doc-resources $OUT_DIR/doc-resources cp -r $SDK_DIR/platform/doc-resources/* $OUT_DIR/doc-resources template/app.js 0 → 100644 +21 −0 Original line number Diff line number Diff line /** * Main application definition for Docs app. Defines a 'Docs' namespace under * which all models, views, controllers, stores, helpers etc should be defined. */ Ext.application({ name: 'Docs', appFolder: 'app', controllers: [ 'Classes', 'Search' ], autoCreateViewport: true, launch: function() { Docs.App = this; Docs.History.init(); } }); Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,4 @@ template/extjs template/resources/css template/resources/sass/.sass-cache sdk-vars.rb
Rakefile +39 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,43 @@ task :install => :build do system "gem install --user-install jsduck" end desc "Run JSDuck on ExtJS SDK" task :sdk do if File.exists?("sdk-vars.rb") require "sdk-vars.rb" else puts "Error: sdk-vars.rb not found." puts puts "Please create file sdk-vars.rb and define constants SDK_DIR and OUT_DIR in it." puts puts "For example:" puts puts " SDK_DIR='/path/to/SDK'" puts " OUT_DIR='/path/to/ouput/dir'" exit 1 end system [ "ruby bin/jsduck", # --external=Error to ignore the Error class that Ext.Error extends. "--external=Error", # to create symbolic links to template files instead of copying them over. # Useful for development. Turn off for deployment. "--template-links", '--link=\'<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>\'', # Note that we wrap image template inside <p> because {@img} often # appears inline withing text, but that just looks ugly in HTML '--img=\'<p><img src="doc-resources/%u" alt="%a"></p>\'', "--guides=#{SDK_DIR}/guides", "--output=#{OUT_DIR}", "#{SDK_DIR}/extjs/src", "#{SDK_DIR}/platform/src", "#{SDK_DIR}/platform/core/src" ].join(" ") # Finally copy over the images that documentation links to. system "cp -r #{SDK_DIR}/extjs/doc-resources #{OUT_DIR}/doc-resources" system "cp -r #{SDK_DIR}/platform/doc-resources/* #{OUT_DIR}/doc-resources" end task :default => :spec
bin/jsduck +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ elsif File.exists?(app.output_dir) && !File.directory?(app.output_dir) puts "Oh noes! The output directory is not really a directory at all :(" exit(1) elsif !File.exists?(File.dirname(app.output_dir)) puts "Oh noes! The parent directory for #{output_dir} doesn't exist." puts "Oh noes! The parent directory for #{app.output_dir} doesn't exist." exit(1) elsif !File.exists?(app.template_dir + "/extjs") puts "Oh noes! The template directory does not contain extjs/ directory :(" Loading
sdk.shdeleted 100755 → 0 +0 −31 Original line number Diff line number Diff line #/usr/bin/env bash # The Bash script I'm currently using to generate documentation from # latest ExtJS SDK. # Sorry, these are currently hard-coded :( SDK_DIR=~/work/SDK OUT_DIR=~/public_html/docs ruby bin/jsduck \ --template-links \ --external=Error \ --link='<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>' \ --img='<p><img src="doc-resources/%u" alt="%a"></p>' \ --guides=$SDK_DIR/guides \ --output=$OUT_DIR \ $SDK_DIR/extjs/src $SDK_DIR/platform/src $SDK_DIR/platform/core/src # --template-links to create symbolic links to template files instead # of copying them over. Useful for development. Turn off for # deployment. # --external=Error to ignore the Error class that Ext.Error extends. # Note that we wrap image template inside <p> because {@img} often # appears inline withing text, but that just looks ugly in HTML # Finally copy over the images that documentation links to. cp -r $SDK_DIR/extjs/doc-resources $OUT_DIR/doc-resources cp -r $SDK_DIR/platform/doc-resources/* $OUT_DIR/doc-resources
template/app.js 0 → 100644 +21 −0 Original line number Diff line number Diff line /** * Main application definition for Docs app. Defines a 'Docs' namespace under * which all models, views, controllers, stores, helpers etc should be defined. */ Ext.application({ name: 'Docs', appFolder: 'app', controllers: [ 'Classes', 'Search' ], autoCreateViewport: true, launch: function() { Docs.App = this; Docs.History.init(); } });