jsduck 0.6.1 → 2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/README.md +35 -13
- data/Rakefile +129 -0
- data/bin/jsduck +112 -20
- data/jsduck.gemspec +10 -7
- data/lib/jsduck/aggregator.rb +46 -20
- data/lib/jsduck/aliases.rb +39 -0
- data/lib/jsduck/app.rb +123 -51
- data/lib/jsduck/categories.rb +132 -0
- data/lib/jsduck/class.rb +71 -18
- data/lib/jsduck/doc_formatter.rb +61 -26
- data/lib/jsduck/doc_parser.rb +53 -2
- data/lib/jsduck/exporter.rb +14 -15
- data/lib/jsduck/guides.rb +110 -0
- data/lib/jsduck/js_parser.rb +18 -4
- data/lib/jsduck/jsonp.rb +17 -0
- data/lib/jsduck/logger.rb +36 -0
- data/lib/jsduck/merger.rb +69 -51
- data/lib/jsduck/page.rb +1 -1
- data/lib/jsduck/relations.rb +14 -3
- data/lib/jsduck/{members.rb → search_data.rb} +3 -28
- data/lib/jsduck/source_file.rb +4 -4
- data/lib/jsduck/source_writer.rb +2 -2
- data/lib/jsduck/timer.rb +6 -2
- data/lib/jsduck/tree.rb +29 -16
- data/lib/jsduck/tree_icons.rb +1 -1
- data/template/README.md +14 -0
- data/template/app.js +25 -0
- data/template/app/Application.js +53 -0
- data/template/app/Favorites.js +88 -0
- data/template/app/History.js +45 -0
- data/template/app/LocalStore.js +45 -0
- data/template/app/Settings.js +39 -0
- data/template/app/Syntax.js +20 -0
- data/template/app/controller/Classes.js +301 -0
- data/template/app/controller/Search.js +156 -0
- data/template/app/model/Favorite.js +11 -0
- data/template/app/model/Setting.js +11 -0
- data/template/app/store/Favorites.js +7 -0
- data/template/app/store/Search.js +14 -0
- data/template/app/store/Settings.js +7 -0
- data/template/app/view/ClassGrid.js +109 -0
- data/template/app/view/HoverMenu.js +59 -0
- data/template/app/view/HoverMenuButton.js +147 -0
- data/template/app/view/Viewport.js +240 -0
- data/template/app/view/cls/Header.js +47 -0
- data/template/app/view/cls/Overview.js +415 -0
- data/template/app/view/cls/Toolbar.js +199 -0
- data/template/app/view/index/Container.js +63 -0
- data/template/app/view/search/Dropdown.js +53 -0
- data/template/app/view/tree/Tree.js +133 -0
- data/template/favicon.ico +0 -0
- data/template/index.html +32 -37
- data/template/{resources/prettify → prettify}/prettify.css +0 -0
- data/template/{resources/prettify → prettify}/prettify.js +0 -0
- data/template/resources/images/class-m.png +0 -0
- data/template/resources/images/class-sm.png +0 -0
- data/template/resources/images/component-m.png +0 -0
- data/template/resources/images/configs.png +0 -0
- data/template/resources/images/data-package.png +0 -0
- data/template/resources/images/doc-m.png +0 -0
- data/template/resources/images/drag-bar-center.png +0 -0
- data/template/resources/{elbow-end.gif → images/elbow-end.gif} +0 -0
- data/template/resources/images/events.png +0 -0
- data/template/resources/images/expandcollapse.png +0 -0
- data/template/resources/images/guide-icon.png +0 -0
- data/template/resources/images/guides.png +0 -0
- data/template/resources/images/headBG.png +0 -0
- data/template/resources/images/header.gif +0 -0
- data/template/resources/images/icon.png +0 -0
- data/template/resources/images/icons.png +0 -0
- data/template/resources/images/loading-title.png +0 -0
- data/template/resources/images/loading.gif +0 -0
- data/template/resources/{member-collapsed.gif → images/member-collapsed.gif} +0 -0
- data/template/resources/{member-expanded.gif → images/member-expanded.gif} +0 -0
- data/template/resources/{member-hover.gif → images/member-hover.gif} +0 -0
- data/template/resources/images/methods.png +0 -0
- data/template/resources/images/model.png +0 -0
- data/template/resources/images/properties.png +0 -0
- data/template/resources/images/root-lines.png +0 -0
- data/template/resources/images/search-box.png +0 -0
- data/template/resources/images/singleton-m.png +0 -0
- data/template/resources/images/version-tabs.png +0 -0
- data/template/resources/images/x.png +0 -0
- data/template/resources/images/x12.png +0 -0
- metadata +84 -387
- data/lib/jsduck/cfg_table.rb +0 -21
- data/lib/jsduck/event_table.rb +0 -33
- data/lib/jsduck/inheritance_tree.rb +0 -42
- data/lib/jsduck/long_params.rb +0 -30
- data/lib/jsduck/method_table.rb +0 -45
- data/lib/jsduck/property_table.rb +0 -21
- data/lib/jsduck/short_params.rb +0 -24
- data/lib/jsduck/table.rb +0 -121
- data/template/resources/TabCloseMenu.js +0 -150
- data/template/resources/block-bottom.gif +0 -0
- data/template/resources/block-top.gif +0 -0
- data/template/resources/class.gif +0 -0
- data/template/resources/cmp.gif +0 -0
- data/template/resources/collapse-all.gif +0 -0
- data/template/resources/config.gif +0 -0
- data/template/resources/css/ext-all.css +0 -6993
- data/template/resources/css/xtheme-gray.css +0 -1654
- data/template/resources/docs.css +0 -361
- data/template/resources/docs.gif +0 -0
- data/template/resources/docs.js +0 -769
- data/template/resources/event.gif +0 -0
- data/template/resources/expand-all.gif +0 -0
- data/template/resources/expand-bg-over.gif +0 -0
- data/template/resources/expand-bg.gif +0 -0
- data/template/resources/expand-members.gif +0 -0
- data/template/resources/ext-all.js +0 -11
- data/template/resources/ext-base.js +0 -7
- data/template/resources/extanim32.gif +0 -0
- data/template/resources/fav.gif +0 -0
- data/template/resources/favicon.ico +0 -0
- data/template/resources/hd-bg.png +0 -0
- data/template/resources/hide-inherited.gif +0 -0
- data/template/resources/images/default/box/corners-blue.gif +0 -0
- data/template/resources/images/default/box/corners.gif +0 -0
- data/template/resources/images/default/box/l-blue.gif +0 -0
- data/template/resources/images/default/box/l.gif +0 -0
- data/template/resources/images/default/box/r-blue.gif +0 -0
- data/template/resources/images/default/box/r.gif +0 -0
- data/template/resources/images/default/box/tb-blue.gif +0 -0
- data/template/resources/images/default/box/tb.gif +0 -0
- data/template/resources/images/default/button/arrow.gif +0 -0
- data/template/resources/images/default/button/btn.gif +0 -0
- data/template/resources/images/default/button/group-cs.gif +0 -0
- data/template/resources/images/default/button/group-lr.gif +0 -0
- data/template/resources/images/default/button/group-tb.gif +0 -0
- data/template/resources/images/default/button/s-arrow-b-noline.gif +0 -0
- data/template/resources/images/default/button/s-arrow-b.gif +0 -0
- data/template/resources/images/default/button/s-arrow-bo.gif +0 -0
- data/template/resources/images/default/button/s-arrow-noline.gif +0 -0
- data/template/resources/images/default/button/s-arrow-o.gif +0 -0
- data/template/resources/images/default/button/s-arrow.gif +0 -0
- data/template/resources/images/default/dd/drop-add.gif +0 -0
- data/template/resources/images/default/dd/drop-no.gif +0 -0
- data/template/resources/images/default/dd/drop-yes.gif +0 -0
- data/template/resources/images/default/editor/tb-sprite.gif +0 -0
- data/template/resources/images/default/form/checkbox.gif +0 -0
- data/template/resources/images/default/form/clear-trigger.gif +0 -0
- data/template/resources/images/default/form/clear-trigger.psd +0 -0
- data/template/resources/images/default/form/date-trigger.gif +0 -0
- data/template/resources/images/default/form/date-trigger.psd +0 -0
- data/template/resources/images/default/form/error-tip-corners.gif +0 -0
- data/template/resources/images/default/form/exclamation.gif +0 -0
- data/template/resources/images/default/form/radio.gif +0 -0
- data/template/resources/images/default/form/search-trigger.gif +0 -0
- data/template/resources/images/default/form/search-trigger.psd +0 -0
- data/template/resources/images/default/form/text-bg.gif +0 -0
- data/template/resources/images/default/form/trigger-square.gif +0 -0
- data/template/resources/images/default/form/trigger-square.psd +0 -0
- data/template/resources/images/default/form/trigger-tpl.gif +0 -0
- data/template/resources/images/default/form/trigger.gif +0 -0
- data/template/resources/images/default/form/trigger.psd +0 -0
- data/template/resources/images/default/gradient-bg.gif +0 -0
- data/template/resources/images/default/grid/arrow-left-white.gif +0 -0
- data/template/resources/images/default/grid/arrow-right-white.gif +0 -0
- data/template/resources/images/default/grid/col-move-bottom.gif +0 -0
- data/template/resources/images/default/grid/col-move-top.gif +0 -0
- data/template/resources/images/default/grid/columns.gif +0 -0
- data/template/resources/images/default/grid/dirty.gif +0 -0
- data/template/resources/images/default/grid/done.gif +0 -0
- data/template/resources/images/default/grid/drop-no.gif +0 -0
- data/template/resources/images/default/grid/drop-yes.gif +0 -0
- data/template/resources/images/default/grid/footer-bg.gif +0 -0
- data/template/resources/images/default/grid/grid-blue-hd.gif +0 -0
- data/template/resources/images/default/grid/grid-blue-split.gif +0 -0
- data/template/resources/images/default/grid/grid-hrow.gif +0 -0
- data/template/resources/images/default/grid/grid-loading.gif +0 -0
- data/template/resources/images/default/grid/grid-split.gif +0 -0
- data/template/resources/images/default/grid/grid-vista-hd.gif +0 -0
- data/template/resources/images/default/grid/grid3-hd-btn.gif +0 -0
- data/template/resources/images/default/grid/grid3-hrow-over.gif +0 -0
- data/template/resources/images/default/grid/grid3-hrow.gif +0 -0
- data/template/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
- data/template/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
- data/template/resources/images/default/grid/group-by.gif +0 -0
- data/template/resources/images/default/grid/group-collapse.gif +0 -0
- data/template/resources/images/default/grid/group-expand-sprite.gif +0 -0
- data/template/resources/images/default/grid/group-expand.gif +0 -0
- data/template/resources/images/default/grid/hd-pop.gif +0 -0
- data/template/resources/images/default/grid/hmenu-asc.gif +0 -0
- data/template/resources/images/default/grid/hmenu-desc.gif +0 -0
- data/template/resources/images/default/grid/hmenu-lock.gif +0 -0
- data/template/resources/images/default/grid/hmenu-lock.png +0 -0
- data/template/resources/images/default/grid/hmenu-unlock.gif +0 -0
- data/template/resources/images/default/grid/hmenu-unlock.png +0 -0
- data/template/resources/images/default/grid/invalid_line.gif +0 -0
- data/template/resources/images/default/grid/loading.gif +0 -0
- data/template/resources/images/default/grid/mso-hd.gif +0 -0
- data/template/resources/images/default/grid/nowait.gif +0 -0
- data/template/resources/images/default/grid/page-first-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-first.gif +0 -0
- data/template/resources/images/default/grid/page-last-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-last.gif +0 -0
- data/template/resources/images/default/grid/page-next-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-next.gif +0 -0
- data/template/resources/images/default/grid/page-prev-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-prev.gif +0 -0
- data/template/resources/images/default/grid/pick-button.gif +0 -0
- data/template/resources/images/default/grid/refresh.gif +0 -0
- data/template/resources/images/default/grid/row-check-sprite.gif +0 -0
- data/template/resources/images/default/grid/row-expand-sprite.gif +0 -0
- data/template/resources/images/default/grid/row-over.gif +0 -0
- data/template/resources/images/default/grid/row-sel.gif +0 -0
- data/template/resources/images/default/grid/sort-hd.gif +0 -0
- data/template/resources/images/default/grid/sort_asc.gif +0 -0
- data/template/resources/images/default/grid/sort_desc.gif +0 -0
- data/template/resources/images/default/grid/wait.gif +0 -0
- data/template/resources/images/default/layout/collapse.gif +0 -0
- data/template/resources/images/default/layout/expand.gif +0 -0
- data/template/resources/images/default/layout/gradient-bg.gif +0 -0
- data/template/resources/images/default/layout/mini-bottom.gif +0 -0
- data/template/resources/images/default/layout/mini-left.gif +0 -0
- data/template/resources/images/default/layout/mini-right.gif +0 -0
- data/template/resources/images/default/layout/mini-top.gif +0 -0
- data/template/resources/images/default/layout/ns-collapse.gif +0 -0
- data/template/resources/images/default/layout/ns-expand.gif +0 -0
- data/template/resources/images/default/layout/panel-close.gif +0 -0
- data/template/resources/images/default/layout/panel-title-bg.gif +0 -0
- data/template/resources/images/default/layout/panel-title-light-bg.gif +0 -0
- data/template/resources/images/default/layout/stick.gif +0 -0
- data/template/resources/images/default/layout/stuck.gif +0 -0
- data/template/resources/images/default/layout/tab-close-on.gif +0 -0
- data/template/resources/images/default/layout/tab-close.gif +0 -0
- data/template/resources/images/default/menu/checked.gif +0 -0
- data/template/resources/images/default/menu/group-checked.gif +0 -0
- data/template/resources/images/default/menu/item-over.gif +0 -0
- data/template/resources/images/default/menu/menu-parent.gif +0 -0
- data/template/resources/images/default/menu/menu.gif +0 -0
- data/template/resources/images/default/menu/unchecked.gif +0 -0
- data/template/resources/images/default/panel/corners-sprite.gif +0 -0
- data/template/resources/images/default/panel/left-right.gif +0 -0
- data/template/resources/images/default/panel/light-hd.gif +0 -0
- data/template/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
- data/template/resources/images/default/panel/tool-sprites.gif +0 -0
- data/template/resources/images/default/panel/tools-sprites-trans.gif +0 -0
- data/template/resources/images/default/panel/top-bottom.gif +0 -0
- data/template/resources/images/default/panel/top-bottom.png +0 -0
- data/template/resources/images/default/panel/white-corners-sprite.gif +0 -0
- data/template/resources/images/default/panel/white-left-right.gif +0 -0
- data/template/resources/images/default/panel/white-top-bottom.gif +0 -0
- data/template/resources/images/default/progress/progress-bg.gif +0 -0
- data/template/resources/images/default/qtip/bg.gif +0 -0
- data/template/resources/images/default/qtip/close.gif +0 -0
- data/template/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
- data/template/resources/images/default/qtip/tip-sprite.gif +0 -0
- data/template/resources/images/default/s.gif +0 -0
- data/template/resources/images/default/shadow-c.png +0 -0
- data/template/resources/images/default/shadow-lr.png +0 -0
- data/template/resources/images/default/shadow.png +0 -0
- data/template/resources/images/default/shared/blue-loading.gif +0 -0
- data/template/resources/images/default/shared/calendar.gif +0 -0
- data/template/resources/images/default/shared/glass-bg.gif +0 -0
- data/template/resources/images/default/shared/hd-sprite.gif +0 -0
- data/template/resources/images/default/shared/large-loading.gif +0 -0
- data/template/resources/images/default/shared/left-btn.gif +0 -0
- data/template/resources/images/default/shared/loading-balls.gif +0 -0
- data/template/resources/images/default/shared/right-btn.gif +0 -0
- data/template/resources/images/default/shared/warning.gif +0 -0
- data/template/resources/images/default/sizer/e-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/e-handle.gif +0 -0
- data/template/resources/images/default/sizer/ne-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/ne-handle.gif +0 -0
- data/template/resources/images/default/sizer/nw-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/nw-handle.gif +0 -0
- data/template/resources/images/default/sizer/s-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/s-handle.gif +0 -0
- data/template/resources/images/default/sizer/se-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/se-handle.gif +0 -0
- data/template/resources/images/default/sizer/square.gif +0 -0
- data/template/resources/images/default/sizer/sw-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/sw-handle.gif +0 -0
- data/template/resources/images/default/slider/slider-bg.png +0 -0
- data/template/resources/images/default/slider/slider-thumb.png +0 -0
- data/template/resources/images/default/slider/slider-v-bg.png +0 -0
- data/template/resources/images/default/slider/slider-v-thumb.png +0 -0
- data/template/resources/images/default/tabs/scroll-left.gif +0 -0
- data/template/resources/images/default/tabs/scroll-right.gif +0 -0
- data/template/resources/images/default/tabs/scroller-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-close.gif +0 -0
- data/template/resources/images/default/tabs/tab-strip-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-strip-bg.png +0 -0
- data/template/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
- data/template/resources/images/default/tabs/tabs-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/bg.gif +0 -0
- data/template/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
- data/template/resources/images/default/toolbar/btn-arrow.gif +0 -0
- data/template/resources/images/default/toolbar/btn-over-bg.gif +0 -0
- data/template/resources/images/default/toolbar/gray-bg.gif +0 -0
- data/template/resources/images/default/toolbar/more.gif +0 -0
- data/template/resources/images/default/toolbar/tb-bg.gif +0 -0
- data/template/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
- data/template/resources/images/default/tree/arrows.gif +0 -0
- data/template/resources/images/default/tree/drop-add.gif +0 -0
- data/template/resources/images/default/tree/drop-between.gif +0 -0
- data/template/resources/images/default/tree/drop-no.gif +0 -0
- data/template/resources/images/default/tree/drop-over.gif +0 -0
- data/template/resources/images/default/tree/drop-under.gif +0 -0
- data/template/resources/images/default/tree/drop-yes.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-minus.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-plus.gif +0 -0
- data/template/resources/images/default/tree/elbow-end.gif +0 -0
- data/template/resources/images/default/tree/elbow-line.gif +0 -0
- data/template/resources/images/default/tree/elbow-minus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-minus.gif +0 -0
- data/template/resources/images/default/tree/elbow-plus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-plus.gif +0 -0
- data/template/resources/images/default/tree/elbow.gif +0 -0
- data/template/resources/images/default/tree/folder-open.gif +0 -0
- data/template/resources/images/default/tree/folder.gif +0 -0
- data/template/resources/images/default/tree/leaf.gif +0 -0
- data/template/resources/images/default/tree/loading.gif +0 -0
- data/template/resources/images/default/tree/s.gif +0 -0
- data/template/resources/images/default/window/icon-error.gif +0 -0
- data/template/resources/images/default/window/icon-info.gif +0 -0
- data/template/resources/images/default/window/icon-question.gif +0 -0
- data/template/resources/images/default/window/icon-warning.gif +0 -0
- data/template/resources/images/default/window/left-corners.png +0 -0
- data/template/resources/images/default/window/left-corners.psd +0 -0
- data/template/resources/images/default/window/left-right.png +0 -0
- data/template/resources/images/default/window/left-right.psd +0 -0
- data/template/resources/images/default/window/right-corners.png +0 -0
- data/template/resources/images/default/window/right-corners.psd +0 -0
- data/template/resources/images/default/window/top-bottom.png +0 -0
- data/template/resources/images/default/window/top-bottom.psd +0 -0
- data/template/resources/images/gray/button/btn-arrow.gif +0 -0
- data/template/resources/images/gray/button/btn-sprite.gif +0 -0
- data/template/resources/images/gray/button/btn.gif +0 -0
- data/template/resources/images/gray/button/group-cs.gif +0 -0
- data/template/resources/images/gray/button/group-lr.gif +0 -0
- data/template/resources/images/gray/button/group-tb.gif +0 -0
- data/template/resources/images/gray/button/s-arrow-bo.gif +0 -0
- data/template/resources/images/gray/button/s-arrow-o.gif +0 -0
- data/template/resources/images/gray/form/clear-trigger.gif +0 -0
- data/template/resources/images/gray/form/date-trigger.gif +0 -0
- data/template/resources/images/gray/form/search-trigger.gif +0 -0
- data/template/resources/images/gray/form/trigger-square.gif +0 -0
- data/template/resources/images/gray/form/trigger.gif +0 -0
- data/template/resources/images/gray/gradient-bg.gif +0 -0
- data/template/resources/images/gray/grid/col-move-bottom.gif +0 -0
- data/template/resources/images/gray/grid/col-move-top.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
- data/template/resources/images/gray/grid/group-collapse.gif +0 -0
- data/template/resources/images/gray/grid/group-expand-sprite.gif +0 -0
- data/template/resources/images/gray/grid/group-expand.gif +0 -0
- data/template/resources/images/gray/grid/page-first.gif +0 -0
- data/template/resources/images/gray/grid/page-last.gif +0 -0
- data/template/resources/images/gray/grid/page-next.gif +0 -0
- data/template/resources/images/gray/grid/page-prev.gif +0 -0
- data/template/resources/images/gray/grid/refresh.gif +0 -0
- data/template/resources/images/gray/grid/row-expand-sprite.gif +0 -0
- data/template/resources/images/gray/grid/sort_asc.gif +0 -0
- data/template/resources/images/gray/grid/sort_desc.gif +0 -0
- data/template/resources/images/gray/menu/group-checked.gif +0 -0
- data/template/resources/images/gray/menu/item-over-disabled.gif +0 -0
- data/template/resources/images/gray/menu/item-over.gif +0 -0
- data/template/resources/images/gray/menu/menu-parent.gif +0 -0
- data/template/resources/images/gray/panel/corners-sprite.gif +0 -0
- data/template/resources/images/gray/panel/left-right.gif +0 -0
- data/template/resources/images/gray/panel/light-hd.gif +0 -0
- data/template/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
- data/template/resources/images/gray/panel/tool-sprites.gif +0 -0
- data/template/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
- data/template/resources/images/gray/panel/top-bottom.gif +0 -0
- data/template/resources/images/gray/panel/top-bottom.png +0 -0
- data/template/resources/images/gray/panel/white-corners-sprite.gif +0 -0
- data/template/resources/images/gray/panel/white-left-right.gif +0 -0
- data/template/resources/images/gray/panel/white-top-bottom.gif +0 -0
- data/template/resources/images/gray/progress/progress-bg.gif +0 -0
- data/template/resources/images/gray/qtip/bg.gif +0 -0
- data/template/resources/images/gray/qtip/close.gif +0 -0
- data/template/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
- data/template/resources/images/gray/qtip/tip-sprite.gif +0 -0
- data/template/resources/images/gray/s.gif +0 -0
- data/template/resources/images/gray/shared/hd-sprite.gif +0 -0
- data/template/resources/images/gray/shared/left-btn.gif +0 -0
- data/template/resources/images/gray/shared/right-btn.gif +0 -0
- data/template/resources/images/gray/sizer/e-handle.gif +0 -0
- data/template/resources/images/gray/sizer/ne-handle.gif +0 -0
- data/template/resources/images/gray/sizer/nw-handle.gif +0 -0
- data/template/resources/images/gray/sizer/s-handle.gif +0 -0
- data/template/resources/images/gray/sizer/se-handle.gif +0 -0
- data/template/resources/images/gray/sizer/square.gif +0 -0
- data/template/resources/images/gray/sizer/sw-handle.gif +0 -0
- data/template/resources/images/gray/slider/slider-thumb.png +0 -0
- data/template/resources/images/gray/slider/slider-v-thumb.png +0 -0
- data/template/resources/images/gray/tabs/scroll-left.gif +0 -0
- data/template/resources/images/gray/tabs/scroll-right.gif +0 -0
- data/template/resources/images/gray/tabs/scroller-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-close.gif +0 -0
- data/template/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-strip-bg.png +0 -0
- data/template/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tabs-sprite.gif +0 -0
- data/template/resources/images/gray/toolbar/bg.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-arrow.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/gray-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/more.gif +0 -0
- data/template/resources/images/gray/toolbar/tb-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
- data/template/resources/images/gray/tree/arrows.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-minus.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-plus.gif +0 -0
- data/template/resources/images/gray/window/icon-error.gif +0 -0
- data/template/resources/images/gray/window/icon-info.gif +0 -0
- data/template/resources/images/gray/window/icon-question.gif +0 -0
- data/template/resources/images/gray/window/icon-warning.gif +0 -0
- data/template/resources/images/gray/window/left-corners.png +0 -0
- data/template/resources/images/gray/window/left-corners.pspimage +0 -0
- data/template/resources/images/gray/window/left-right.png +0 -0
- data/template/resources/images/gray/window/right-corners.png +0 -0
- data/template/resources/images/gray/window/top-bottom.png +0 -0
- data/template/resources/inherited.gif +0 -0
- data/template/resources/method.gif +0 -0
- data/template/resources/pkg-closed.gif +0 -0
- data/template/resources/pkg-open.gif +0 -0
- data/template/resources/pkg.gif +0 -0
- data/template/resources/prop.gif +0 -0
- data/template/resources/s.gif +0 -0
- data/template/resources/static.gif +0 -0
- data/template/resources/style.css +0 -291
- data/template/welcome.html +0 -45
data/lib/jsduck/relations.rb
CHANGED
@@ -4,20 +4,26 @@ module JsDuck
|
|
4
4
|
#
|
5
5
|
# Also provides a place to look up classes by name.
|
6
6
|
#
|
7
|
-
# The constructor is initialized with array of all available
|
8
|
-
#
|
7
|
+
# The constructor is initialized with array of all available classes
|
8
|
+
# and list of class names to ignore. By default the latter list
|
9
|
+
# contains only JavaScript base class "Object".
|
9
10
|
class Relations
|
10
11
|
# Returns list of all classes
|
11
12
|
attr_reader :classes
|
12
13
|
|
13
|
-
def initialize(classes = [])
|
14
|
+
def initialize(classes = [], ignorables = [])
|
14
15
|
@classes = classes
|
16
|
+
@ignorables = {"Object" => true}
|
17
|
+
ignorables.each {|classname| @ignorables[classname] = true }
|
15
18
|
|
16
19
|
# First build class lookup table; building lookup tables for
|
17
20
|
# mixins and subclasses will depend on that.
|
18
21
|
@lookup = {}
|
19
22
|
@classes.each do |cls|
|
20
23
|
@lookup[cls.full_name] = cls
|
24
|
+
(cls[:alternateClassNames] || []).each do |alt_name|
|
25
|
+
@lookup[alt_name] = cls
|
26
|
+
end
|
21
27
|
cls.relations = self
|
22
28
|
end
|
23
29
|
|
@@ -34,6 +40,11 @@ module JsDuck
|
|
34
40
|
@lookup[classname]
|
35
41
|
end
|
36
42
|
|
43
|
+
# Returns true if class is in list of ignored classes.
|
44
|
+
def ignore?(classname)
|
45
|
+
@ignorables[classname]
|
46
|
+
end
|
47
|
+
|
37
48
|
def each(&block)
|
38
49
|
@classes.each(&block)
|
39
50
|
end
|
@@ -3,7 +3,7 @@ module JsDuck
|
|
3
3
|
|
4
4
|
# Creates list of all members in all classes that is used by the
|
5
5
|
# searching feature in UI.
|
6
|
-
class
|
6
|
+
class SearchData
|
7
7
|
# Given list of class documentation objects returns an array of
|
8
8
|
# hashes describing all the members.
|
9
9
|
def create(docs)
|
@@ -13,7 +13,7 @@ module JsDuck
|
|
13
13
|
[:cfg, :property, :method, :event].each do |type|
|
14
14
|
cls.members(type).each do |m|
|
15
15
|
# skip inherited items and constructors
|
16
|
-
if m[:
|
16
|
+
if m[:owner] == cls.full_name && m[:name] != cls.short_name
|
17
17
|
list << member_node(m, cls)
|
18
18
|
end
|
19
19
|
end
|
@@ -28,7 +28,7 @@ module JsDuck
|
|
28
28
|
:cls => cls.full_name,
|
29
29
|
:member => cls.short_name,
|
30
30
|
:type => :cls,
|
31
|
-
:
|
31
|
+
:xtypes => cls[:xtypes]
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
@@ -38,34 +38,9 @@ module JsDuck
|
|
38
38
|
:cls => cls.full_name,
|
39
39
|
:member => member[:name],
|
40
40
|
:type => member[:tagname],
|
41
|
-
:doc => short_desc(member[:doc])
|
42
41
|
}
|
43
42
|
end
|
44
43
|
|
45
|
-
def short_desc(str)
|
46
|
-
tagless = first_sentence(strip_tags(strip_links(str)))
|
47
|
-
if tagless.length > 120
|
48
|
-
short_doc = tagless[0..116]
|
49
|
-
ellipsis = tagless.length > short_doc.length ? "..." : ""
|
50
|
-
tagless[0..116] + ellipsis
|
51
|
-
else
|
52
|
-
tagless
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def strip_tags(str)
|
57
|
-
str.gsub(/<.*?>/, "")
|
58
|
-
end
|
59
|
-
|
60
|
-
def strip_links(str)
|
61
|
-
str = str.gsub(/\{@link +(\S*?)(?: +(.+?))?\}/, "\\1")
|
62
|
-
str = str.gsub(/#/, ".")
|
63
|
-
end
|
64
|
-
|
65
|
-
def first_sentence(str)
|
66
|
-
str.sub(/\A(.+?\.)\s.*\Z/m, "\\1")
|
67
|
-
end
|
68
|
-
|
69
44
|
end
|
70
45
|
|
71
46
|
end
|
data/lib/jsduck/source_file.rb
CHANGED
@@ -68,8 +68,8 @@ module JsDuck
|
|
68
68
|
doc[:name].gsub(/\./, '-')
|
69
69
|
else
|
70
70
|
# when creation of global class is skipped,
|
71
|
-
# this
|
72
|
-
(doc[:
|
71
|
+
# this owner property can be nil.
|
72
|
+
(doc[:owner] || "global").gsub(/\./, '-') + "-" + doc[:tagname].to_s + "-" + doc[:name]
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -93,8 +93,8 @@ module JsDuck
|
|
93
93
|
doc[:filename] = @filename
|
94
94
|
doc[:linenr] = linenr
|
95
95
|
if doc[:tagname] == :class
|
96
|
-
doc[:cfg].each {|cfg| link(linenr, cfg) }
|
97
|
-
doc[:method].each {|method| link(linenr, method) }
|
96
|
+
doc[:members][:cfg].each {|cfg| link(linenr, cfg) }
|
97
|
+
doc[:members][:method].each {|method| link(linenr, method) }
|
98
98
|
end
|
99
99
|
doc
|
100
100
|
end
|
data/lib/jsduck/source_writer.rb
CHANGED
@@ -45,8 +45,8 @@ module JsDuck
|
|
45
45
|
<head>
|
46
46
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
47
47
|
<title>The source code</title>
|
48
|
-
<link href="../
|
49
|
-
<script type="text/javascript" src="../
|
48
|
+
<link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
|
49
|
+
<script type="text/javascript" src="../prettify/prettify.js"></script>
|
50
50
|
<style type="text/css">
|
51
51
|
.highlight { display: block; background-color: #ddd; }
|
52
52
|
</style>
|
data/lib/jsduck/timer.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'jsduck/logger'
|
2
|
+
|
1
3
|
module JsDuck
|
2
4
|
|
3
5
|
# Helper for timing execution of named code blocks.
|
@@ -31,9 +33,11 @@ module JsDuck
|
|
31
33
|
result
|
32
34
|
end
|
33
35
|
|
34
|
-
# prints timings report to
|
36
|
+
# prints timings report to log
|
35
37
|
def report
|
36
|
-
@timings.each
|
38
|
+
@timings.each do |name, time|
|
39
|
+
Logger.instance.log("#{name}:\t#{time} seconds")
|
40
|
+
end
|
37
41
|
end
|
38
42
|
end
|
39
43
|
|
data/lib/jsduck/tree.rb
CHANGED
@@ -12,7 +12,6 @@ module JsDuck
|
|
12
12
|
:id => "apidocs",
|
13
13
|
:iconCls => "icon-docs",
|
14
14
|
:text => "API Documentation",
|
15
|
-
:singleClickExpand => true,
|
16
15
|
:children => []
|
17
16
|
}
|
18
17
|
@packages = {"" => @root}
|
@@ -21,24 +20,25 @@ module JsDuck
|
|
21
20
|
# Given list of class documentation objects returns a
|
22
21
|
# tree-structure that can be turned into JSON that's needed by
|
23
22
|
# documentation browser interface.
|
24
|
-
def create(docs)
|
23
|
+
def create(docs, guides=[])
|
25
24
|
docs.each {|cls| add_class(cls) }
|
26
25
|
sort_tree(@root)
|
26
|
+
add_guides(guides)
|
27
27
|
@root
|
28
28
|
end
|
29
29
|
|
30
30
|
# Sorts all child nodes, and recursively all child packages.
|
31
31
|
def sort_tree(node)
|
32
32
|
node[:children].sort! {|a,b| compare(a, b) }
|
33
|
-
node[:children].find_all {|c| c[:
|
33
|
+
node[:children].find_all {|c| c[:children] }.each {|c| sort_tree(c) }
|
34
34
|
end
|
35
35
|
|
36
36
|
# Comparson method that sorts package nodes before class nodes.
|
37
37
|
def compare(a, b)
|
38
|
-
if a[:
|
39
|
-
a[:text]
|
38
|
+
if a[:leaf] == b[:leaf]
|
39
|
+
a[:text].casecmp(b[:text])
|
40
40
|
else
|
41
|
-
a[:
|
41
|
+
a[:leaf] ? 1 : -1
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -65,40 +65,53 @@ module JsDuck
|
|
65
65
|
package
|
66
66
|
end
|
67
67
|
|
68
|
+
# When guides list not empty, add guides to tree
|
69
|
+
def add_guides(guides)
|
70
|
+
if guides.length > 0
|
71
|
+
pkg = package_node("guides")
|
72
|
+
guides.each {|g| pkg[:children] << guide_node(g) }
|
73
|
+
@root[:children] << pkg
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
68
77
|
# Given full doc object for class creates class node
|
69
78
|
def class_node(cls)
|
70
79
|
return {
|
71
|
-
:href => "output/#{cls.full_name}.html",
|
72
80
|
:text => cls.short_name,
|
73
|
-
:
|
74
|
-
:isClass => true,
|
81
|
+
:url => "/api/"+cls.full_name,
|
75
82
|
:iconCls => class_icon(cls),
|
76
|
-
:cls => "cls",
|
77
83
|
:leaf => true
|
78
84
|
}
|
79
85
|
end
|
80
86
|
|
81
87
|
def class_icon(cls)
|
82
88
|
if cls[:singleton]
|
83
|
-
"icon-
|
89
|
+
"icon-singleton"
|
84
90
|
elsif cls.inherits_from?("Ext.Component")
|
85
|
-
"icon-
|
91
|
+
"icon-component"
|
86
92
|
else
|
87
|
-
"icon-
|
93
|
+
"icon-class"
|
88
94
|
end
|
89
95
|
end
|
90
96
|
|
91
97
|
# Given full package name like my.package creates package node
|
92
98
|
def package_node(name)
|
93
99
|
return {
|
94
|
-
:id => "pkg-#{name}",
|
95
100
|
:text => Class.short_name(name),
|
96
101
|
:iconCls => "icon-pkg",
|
97
|
-
:cls => "package",
|
98
|
-
:singleClickExpand => true,
|
99
102
|
:children => []
|
100
103
|
}
|
101
104
|
end
|
105
|
+
|
106
|
+
# Given full guide object creates guide node
|
107
|
+
def guide_node(guide)
|
108
|
+
return {
|
109
|
+
:text => guide[:title],
|
110
|
+
:url => "/guide/"+guide[:name],
|
111
|
+
:iconCls => "icon-guide",
|
112
|
+
:leaf => true
|
113
|
+
}
|
114
|
+
end
|
102
115
|
end
|
103
116
|
|
104
117
|
end
|
data/lib/jsduck/tree_icons.rb
CHANGED
data/template/README.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
Manyally create extjs/ directory inside this dir.
|
2
|
+
|
3
|
+
Either copy over ExtJS directory or create symlink to it.
|
4
|
+
|
5
|
+
$ cp -r /path/to/ext-4.0.0 template/extjs
|
6
|
+
|
7
|
+
or
|
8
|
+
|
9
|
+
$ ln -s /path/to/ext-4.0.0 template/extjs
|
10
|
+
|
11
|
+
Then run compass to generate custom ExtJS theme:
|
12
|
+
|
13
|
+
$ compass template/resources/sass
|
14
|
+
|
data/template/app.js
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Ext.ns("Docs");
|
2
|
+
|
3
|
+
Ext.Loader.setConfig({
|
4
|
+
enabled: true,
|
5
|
+
paths: {
|
6
|
+
'Docs': 'app'
|
7
|
+
}
|
8
|
+
});
|
9
|
+
|
10
|
+
Ext.require('Docs.view.Viewport');
|
11
|
+
Ext.require('Ext.form.field.Trigger');
|
12
|
+
Ext.require('Ext.tab.Panel');
|
13
|
+
Ext.require('Ext.grid.column.Action');
|
14
|
+
Ext.require('Ext.grid.plugin.DragDrop');
|
15
|
+
Ext.require('Ext.layout.container.Border');
|
16
|
+
Ext.require('Ext.data.TreeStore');
|
17
|
+
|
18
|
+
// The following is exactly what Ext.application() function does, but
|
19
|
+
// we use our own Application class that extends Ext.app.Application
|
20
|
+
|
21
|
+
Ext.require('Docs.Application');
|
22
|
+
|
23
|
+
Ext.onReady(function() {
|
24
|
+
Ext.create('Docs.Application');
|
25
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/**
|
2
|
+
* Main application definition for Docs app.
|
3
|
+
*
|
4
|
+
* We define our own Application class because this way we can also
|
5
|
+
* easily define the dependencies.
|
6
|
+
*/
|
7
|
+
Ext.define('Docs.Application', {
|
8
|
+
extend: 'Ext.app.Application',
|
9
|
+
name: 'Docs',
|
10
|
+
|
11
|
+
requires: [
|
12
|
+
'Docs.Favorites',
|
13
|
+
'Docs.History',
|
14
|
+
'Docs.Settings'
|
15
|
+
],
|
16
|
+
|
17
|
+
uses: [
|
18
|
+
'Ext.util.History',
|
19
|
+
'Ext.data.JsonP'
|
20
|
+
],
|
21
|
+
|
22
|
+
controllers: [
|
23
|
+
'Classes',
|
24
|
+
'Search'
|
25
|
+
],
|
26
|
+
|
27
|
+
launch: function() {
|
28
|
+
Docs.App = this;
|
29
|
+
Docs.Favorites.init();
|
30
|
+
Docs.Settings.init();
|
31
|
+
|
32
|
+
Ext.create('Docs.view.Viewport');
|
33
|
+
|
34
|
+
// Update favorites grid height between browser tabs if changed
|
35
|
+
Ext.getStore('Settings').on('load', function(store) {
|
36
|
+
var favHeight = Docs.Settings.get('favorites-height');
|
37
|
+
if (favHeight) {
|
38
|
+
var tabPanel = Ext.getCmp('classes-tab-panel');
|
39
|
+
tabPanel.suspendEvents();
|
40
|
+
tabPanel.setHeight(favHeight);
|
41
|
+
tabPanel.resumeEvents();
|
42
|
+
}
|
43
|
+
});
|
44
|
+
|
45
|
+
Docs.History.init();
|
46
|
+
|
47
|
+
// When google analytics event tracking script present on page
|
48
|
+
if (Docs.initEventTracking) {
|
49
|
+
Docs.initEventTracking();
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
});
|
@@ -0,0 +1,88 @@
|
|
1
|
+
/**
|
2
|
+
* Favorites management.
|
3
|
+
*/
|
4
|
+
Ext.define("Docs.Favorites", {
|
5
|
+
extend: 'Docs.LocalStore',
|
6
|
+
storeName: 'Favorites',
|
7
|
+
singleton: true,
|
8
|
+
|
9
|
+
init: function() {
|
10
|
+
this.callParent(arguments);
|
11
|
+
|
12
|
+
// Populate favorites with Top 10 classes
|
13
|
+
if (this.store.data.items.length == 0) {
|
14
|
+
var top10 = [
|
15
|
+
'Ext.data.Store',
|
16
|
+
'Ext',
|
17
|
+
'Ext.grid.Panel',
|
18
|
+
'Ext.panel.Panel',
|
19
|
+
'Ext.form.field.ComboBox',
|
20
|
+
'Ext.data.Model',
|
21
|
+
'Ext.form.Panel',
|
22
|
+
'Ext.button.Button',
|
23
|
+
'Ext.tree.Panel',
|
24
|
+
'Ext.Component'
|
25
|
+
];
|
26
|
+
this.store.add(Ext.Array.map(top10, function(clsName) {
|
27
|
+
return {url: "/api/"+clsName, title: clsName};
|
28
|
+
}));
|
29
|
+
this.syncStore();
|
30
|
+
}
|
31
|
+
|
32
|
+
// For backwards compatibility with old Favorites Model
|
33
|
+
// convert the old-style records to new schema.
|
34
|
+
else if (!this.store.first().get("url")) {
|
35
|
+
this.store.each(function(r) {
|
36
|
+
r.set("title", r.data.cls);
|
37
|
+
r.set("url", "/api/"+r.get("cls"));
|
38
|
+
r.set("cls", "");
|
39
|
+
});
|
40
|
+
this.syncStore();
|
41
|
+
}
|
42
|
+
},
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Associates Favorites with Docs TreePanel component.
|
46
|
+
* @param {Docs.view.tree.Tree} tree
|
47
|
+
*/
|
48
|
+
setTree: function(tree) {
|
49
|
+
this.tree = tree;
|
50
|
+
},
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Adds page to favorites
|
54
|
+
*
|
55
|
+
* @param {String} url the page to add
|
56
|
+
* @param {String} title title for Favorites entry
|
57
|
+
*/
|
58
|
+
add: function(url, title) {
|
59
|
+
if (!this.has(url)) {
|
60
|
+
this.store.add({url: url, title: title});
|
61
|
+
this.syncStore();
|
62
|
+
this.tree.setFavorite(url, true);
|
63
|
+
}
|
64
|
+
},
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Removes page from favorites.
|
68
|
+
*
|
69
|
+
* @param {String} url the page URL to remove
|
70
|
+
*/
|
71
|
+
remove: function(url) {
|
72
|
+
if (this.has(url)) {
|
73
|
+
this.store.removeAt(this.store.findExact('url', url));
|
74
|
+
this.syncStore();
|
75
|
+
this.tree.setFavorite(url, false);
|
76
|
+
}
|
77
|
+
},
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Checks if page exists in favorites
|
81
|
+
*
|
82
|
+
* @param {String} url the URL to check
|
83
|
+
* @return {Boolean} true when present
|
84
|
+
*/
|
85
|
+
has: function(url) {
|
86
|
+
return this.store.findExact('url', url) > -1;
|
87
|
+
}
|
88
|
+
});
|