jazzy 0.13.5 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/Tests.yml +52 -0
  3. data/.rubocop.yml +139 -24
  4. data/CHANGELOG.md +105 -0
  5. data/CONTRIBUTING.md +5 -5
  6. data/Dangerfile +11 -8
  7. data/Gemfile +3 -1
  8. data/Gemfile.lock +101 -77
  9. data/README.md +81 -13
  10. data/Rakefile +13 -12
  11. data/bin/jazzy +3 -2
  12. data/bin/sourcekitten +0 -0
  13. data/jazzy.gemspec +8 -6
  14. data/js/package-lock.json +30 -25
  15. data/js/package.json +3 -3
  16. data/lib/jazzy/config.rb +125 -72
  17. data/lib/jazzy/doc.rb +3 -1
  18. data/lib/jazzy/doc_builder.rb +79 -84
  19. data/lib/jazzy/docset_builder.rb +3 -1
  20. data/lib/jazzy/documentation_generator.rb +6 -2
  21. data/lib/jazzy/executable.rb +3 -0
  22. data/lib/jazzy/extensions/bitbucket/img/bitbucket.svg +11 -0
  23. data/lib/jazzy/{themes/apple/assets → extensions/github}/img/gh.png +0 -0
  24. data/lib/jazzy/extensions/gitlab/img/gitlab.svg +23 -0
  25. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
  26. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff +0 -0
  27. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  28. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  29. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  30. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  31. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  32. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  33. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  34. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  35. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  36. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  37. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  38. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  39. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  40. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.ttf +0 -0
  41. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.woff +0 -0
  42. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
  43. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  44. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  45. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  46. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.ttf +0 -0
  47. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.woff +0 -0
  48. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
  49. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.ttf +0 -0
  50. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.woff +0 -0
  51. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
  52. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  53. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  54. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  55. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.ttf +0 -0
  56. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.woff +0 -0
  57. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
  58. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  59. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  60. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  61. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  62. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  63. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  64. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  65. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  66. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  67. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.ttf +0 -0
  68. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.woff +0 -0
  69. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
  70. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
  71. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.woff +0 -0
  72. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  73. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
  74. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.woff +0 -0
  75. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  76. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
  77. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.woff +0 -0
  78. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  79. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
  80. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.woff +0 -0
  81. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  82. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  83. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  84. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  85. data/lib/jazzy/extensions/katex/css/katex.min.css +1 -1
  86. data/lib/jazzy/extensions/katex/js/katex.min.js +1 -1
  87. data/lib/jazzy/gem_version.rb +3 -1
  88. data/lib/jazzy/highlighter.rb +17 -3
  89. data/lib/jazzy/jazzy_markdown.rb +112 -31
  90. data/lib/jazzy/podspec_documenter.rb +14 -16
  91. data/lib/jazzy/search_builder.rb +4 -3
  92. data/lib/jazzy/source_declaration/access_control_level.rb +7 -5
  93. data/lib/jazzy/source_declaration/type.rb +29 -3
  94. data/lib/jazzy/source_declaration.rb +18 -3
  95. data/lib/jazzy/source_document.rb +8 -5
  96. data/lib/jazzy/source_host.rb +111 -0
  97. data/lib/jazzy/source_mark.rb +8 -6
  98. data/lib/jazzy/source_module.rb +6 -6
  99. data/lib/jazzy/sourcekitten.rb +157 -86
  100. data/lib/jazzy/stats.rb +14 -3
  101. data/lib/jazzy/symbol_graph/constraint.rb +98 -0
  102. data/lib/jazzy/symbol_graph/ext_node.rb +116 -0
  103. data/lib/jazzy/symbol_graph/graph.rb +200 -0
  104. data/lib/jazzy/symbol_graph/relationship.rb +48 -0
  105. data/lib/jazzy/symbol_graph/sym_node.rb +176 -0
  106. data/lib/jazzy/symbol_graph/symbol.rb +248 -0
  107. data/lib/jazzy/symbol_graph.rb +95 -0
  108. data/lib/jazzy/themes/apple/assets/css/highlight.css.scss +63 -59
  109. data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +26 -2
  110. data/lib/jazzy/themes/apple/assets/js/jazzy.js +4 -0
  111. data/lib/jazzy/themes/apple/assets/js/jazzy.search.js +4 -0
  112. data/lib/jazzy/themes/apple/assets/js/jquery.min.js +2 -2
  113. data/lib/jazzy/themes/apple/assets/js/lunr.min.js +3 -3
  114. data/lib/jazzy/themes/apple/templates/doc.mustache +4 -5
  115. data/lib/jazzy/themes/apple/templates/footer.mustache +1 -1
  116. data/lib/jazzy/themes/apple/templates/header.mustache +6 -6
  117. data/lib/jazzy/themes/apple/templates/task.mustache +6 -11
  118. data/lib/jazzy/themes/fullwidth/assets/css/highlight.css.scss +63 -59
  119. data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +11 -2
  120. data/lib/jazzy/themes/fullwidth/assets/js/jazzy.js +4 -0
  121. data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +4 -0
  122. data/lib/jazzy/themes/fullwidth/assets/js/jquery.min.js +2 -2
  123. data/lib/jazzy/themes/fullwidth/assets/js/lunr.min.js +3 -3
  124. data/lib/jazzy/themes/fullwidth/templates/doc.mustache +4 -5
  125. data/lib/jazzy/themes/fullwidth/templates/footer.mustache +1 -1
  126. data/lib/jazzy/themes/fullwidth/templates/header.mustache +8 -8
  127. data/lib/jazzy/themes/fullwidth/templates/task.mustache +6 -11
  128. data/lib/jazzy/themes/jony/assets/css/highlight.css.scss +63 -59
  129. data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +26 -2
  130. data/lib/jazzy/themes/jony/assets/js/jazzy.js +4 -0
  131. data/lib/jazzy/themes/jony/assets/js/jquery.min.js +2 -2
  132. data/lib/jazzy/themes/jony/templates/doc.mustache +4 -5
  133. data/lib/jazzy/themes/jony/templates/footer.mustache +1 -1
  134. data/lib/jazzy/themes/jony/templates/header.mustache +6 -6
  135. data/lib/jazzy/themes/jony/templates/task.mustache +6 -11
  136. data/lib/jazzy.rb +2 -0
  137. data/spec/integration_spec.rb +59 -45
  138. data/spec/spec_helper/pre_flight.rb +2 -0
  139. data/spec/spec_helper.rb +3 -1
  140. metadata +39 -19
  141. data/.circleci/config.yml +0 -83
  142. data/lib/jazzy/themes/fullwidth/assets/img/gh.png +0 -0
  143. data/lib/jazzy/themes/jony/assets/img/gh.png +0 -0
  144. data/spec/sourcekitten_spec.rb +0 -6
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.13.5)
4
+ jazzy (0.14.1)
5
5
  cocoapods (~> 1.5)
6
6
  mustache (~> 1.1)
7
- open4
7
+ open4 (~> 1.3)
8
8
  redcarpet (~> 3.4)
9
+ rexml (~> 3.2)
9
10
  rouge (>= 2.0.6, < 4.0)
10
11
  sassc (~> 2.1)
11
12
  sqlite3 (~> 1.3)
@@ -14,18 +15,20 @@ PATH
14
15
  GEM
15
16
  remote: https://rubygems.org/
16
17
  specs:
17
- CFPropertyList (3.0.2)
18
- activesupport (4.2.11.3)
19
- i18n (~> 0.7)
20
- minitest (~> 5.1)
21
- thread_safe (~> 0.3, >= 0.3.4)
22
- tzinfo (~> 1.1)
23
- addressable (2.7.0)
18
+ CFPropertyList (3.0.4)
19
+ rexml
20
+ activesupport (6.1.4.1)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 1.6, < 2)
23
+ minitest (>= 5.1)
24
+ tzinfo (~> 2.0)
25
+ zeitwerk (~> 2.3)
26
+ addressable (2.8.0)
24
27
  public_suffix (>= 2.0.2, < 5.0)
25
- algoliasearch (1.27.3)
28
+ algoliasearch (1.27.5)
26
29
  httpclient (~> 2.8, >= 2.8.3)
27
30
  json (>= 1.5.1)
28
- ast (2.4.1)
31
+ ast (2.4.2)
29
32
  atomos (0.1.3)
30
33
  bacon (1.2.0)
31
34
  claide (1.0.3)
@@ -36,51 +39,51 @@ GEM
36
39
  clintegracon (0.7.0)
37
40
  colored (~> 1.2)
38
41
  diffy
39
- cocoapods (1.9.3)
40
- activesupport (>= 4.0.2, < 5)
42
+ cocoapods (1.11.2)
43
+ addressable (~> 2.8)
41
44
  claide (>= 1.0.2, < 2.0)
42
- cocoapods-core (= 1.9.3)
45
+ cocoapods-core (= 1.11.2)
43
46
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
44
- cocoapods-downloader (>= 1.2.2, < 2.0)
47
+ cocoapods-downloader (>= 1.4.0, < 2.0)
45
48
  cocoapods-plugins (>= 1.0.0, < 2.0)
46
49
  cocoapods-search (>= 1.0.0, < 2.0)
47
- cocoapods-stats (>= 1.0.0, < 2.0)
48
50
  cocoapods-trunk (>= 1.4.0, < 2.0)
49
51
  cocoapods-try (>= 1.1.0, < 2.0)
50
52
  colored2 (~> 3.1)
51
53
  escape (~> 0.0.4)
52
54
  fourflusher (>= 2.3.0, < 3.0)
53
55
  gh_inspector (~> 1.0)
54
- molinillo (~> 0.6.6)
56
+ molinillo (~> 0.8.0)
55
57
  nap (~> 1.0)
56
- ruby-macho (~> 1.4)
57
- xcodeproj (>= 1.14.0, < 2.0)
58
- cocoapods-core (1.9.3)
59
- activesupport (>= 4.0.2, < 6)
58
+ ruby-macho (>= 1.0, < 3.0)
59
+ xcodeproj (>= 1.21.0, < 2.0)
60
+ cocoapods-core (1.11.2)
61
+ activesupport (>= 5.0, < 7)
62
+ addressable (~> 2.8)
60
63
  algoliasearch (~> 1.0)
61
64
  concurrent-ruby (~> 1.1)
62
65
  fuzzy_match (~> 2.0.4)
63
66
  nap (~> 1.0)
64
67
  netrc (~> 0.11)
68
+ public_suffix (~> 4.0)
65
69
  typhoeus (~> 1.0)
66
- cocoapods-deintegrate (1.0.4)
67
- cocoapods-downloader (1.3.0)
70
+ cocoapods-deintegrate (1.0.5)
71
+ cocoapods-downloader (1.5.1)
68
72
  cocoapods-plugins (1.0.0)
69
73
  nap
70
- cocoapods-search (1.0.0)
71
- cocoapods-stats (1.1.0)
72
- cocoapods-trunk (1.5.0)
74
+ cocoapods-search (1.0.1)
75
+ cocoapods-trunk (1.6.0)
73
76
  nap (>= 0.8, < 2.0)
74
77
  netrc (~> 0.11)
75
78
  cocoapods-try (1.2.0)
76
79
  colored (1.2)
77
80
  colored2 (3.1.2)
78
- concurrent-ruby (1.1.6)
81
+ concurrent-ruby (1.1.9)
79
82
  cork (0.3.0)
80
83
  colored2 (~> 3.1)
81
- crack (0.4.3)
82
- safe_yaml (~> 1.0.0)
83
- danger (8.0.2)
84
+ crack (0.4.5)
85
+ rexml
86
+ danger (8.4.0)
84
87
  claide (~> 1.0)
85
88
  claide-plugins (>= 0.9.2)
86
89
  colored2 (~> 3.1)
@@ -88,107 +91,128 @@ GEM
88
91
  faraday (>= 0.9.0, < 2.0)
89
92
  faraday-http-cache (~> 2.0)
90
93
  git (~> 1.7)
91
- kramdown (~> 2.0)
94
+ kramdown (~> 2.3)
92
95
  kramdown-parser-gfm (~> 1.0)
93
96
  no_proxy_fix
94
97
  octokit (~> 4.7)
95
- terminal-table (~> 1)
96
- diffy (3.3.0)
98
+ terminal-table (>= 1, < 4)
99
+ diffy (3.4.0)
97
100
  escape (0.0.4)
98
- ethon (0.12.0)
99
- ffi (>= 1.3.0)
100
- faraday (1.0.1)
101
+ ethon (0.14.0)
102
+ ffi (>= 1.15.0)
103
+ faraday (1.8.0)
104
+ faraday-em_http (~> 1.0)
105
+ faraday-em_synchrony (~> 1.0)
106
+ faraday-excon (~> 1.1)
107
+ faraday-httpclient (~> 1.0.1)
108
+ faraday-net_http (~> 1.0)
109
+ faraday-net_http_persistent (~> 1.1)
110
+ faraday-patron (~> 1.0)
111
+ faraday-rack (~> 1.0)
101
112
  multipart-post (>= 1.2, < 3)
113
+ ruby2_keywords (>= 0.0.4)
114
+ faraday-em_http (1.0.0)
115
+ faraday-em_synchrony (1.0.0)
116
+ faraday-excon (1.1.0)
102
117
  faraday-http-cache (2.2.0)
103
118
  faraday (>= 0.8)
104
- ffi (1.13.1)
119
+ faraday-httpclient (1.0.1)
120
+ faraday-net_http (1.0.1)
121
+ faraday-net_http_persistent (1.2.0)
122
+ faraday-patron (1.0.0)
123
+ faraday-rack (1.0.0)
124
+ ffi (1.15.4)
105
125
  fourflusher (2.3.1)
106
126
  fuzzy_match (2.0.4)
107
127
  gh_inspector (1.1.3)
108
- git (1.7.0)
128
+ git (1.9.1)
109
129
  rchardet (~> 1.8)
110
130
  hashdiff (1.0.1)
111
131
  httpclient (2.8.3)
112
- i18n (0.9.5)
132
+ i18n (1.8.10)
113
133
  concurrent-ruby (~> 1.0)
114
- json (2.3.1)
115
- kramdown (2.3.0)
134
+ json (2.5.1)
135
+ kramdown (2.3.1)
116
136
  rexml
117
137
  kramdown-parser-gfm (1.1.0)
118
138
  kramdown (~> 2.0)
119
139
  liferaft (0.0.6)
120
- minitest (5.14.1)
121
- mocha (1.11.2)
140
+ minitest (5.14.4)
141
+ mocha (1.13.0)
122
142
  mocha-on-bacon (0.2.3)
123
143
  mocha (>= 0.13.0)
124
- molinillo (0.6.6)
144
+ molinillo (0.8.0)
125
145
  multipart-post (2.1.1)
126
146
  mustache (1.1.1)
127
- nanaimo (0.2.6)
147
+ nanaimo (0.3.0)
128
148
  nap (1.1.0)
129
149
  netrc (0.11.0)
130
150
  no_proxy_fix (0.1.2)
131
- octokit (4.18.0)
151
+ octokit (4.21.0)
132
152
  faraday (>= 0.9)
133
153
  sawyer (~> 0.8.0, >= 0.5.3)
134
154
  open4 (1.3.4)
135
- parallel (1.19.2)
136
- parser (2.7.1.4)
155
+ parallel (1.21.0)
156
+ parser (3.0.2.0)
137
157
  ast (~> 2.4.1)
138
- powerpack (0.1.2)
139
158
  prettybacon (0.0.2)
140
159
  bacon (~> 1.2)
141
- public_suffix (4.0.5)
142
- rainbow (2.2.2)
143
- rake
144
- rake (13.0.1)
160
+ public_suffix (4.0.6)
161
+ rainbow (3.0.0)
162
+ rake (13.0.6)
145
163
  rchardet (1.8.0)
146
- redcarpet (3.5.0)
147
- rexml (3.2.4)
148
- rouge (3.20.0)
149
- rubocop (0.49.0)
164
+ redcarpet (3.5.1)
165
+ regexp_parser (2.1.1)
166
+ rexml (3.2.5)
167
+ rouge (3.26.1)
168
+ rubocop (1.22.0)
150
169
  parallel (~> 1.10)
151
- parser (>= 2.3.3.1, < 3.0)
152
- powerpack (~> 0.1)
153
- rainbow (>= 1.99.1, < 3.0)
170
+ parser (>= 3.0.0.0)
171
+ rainbow (>= 2.2.2, < 4.0)
172
+ regexp_parser (>= 1.8, < 3.0)
173
+ rexml
174
+ rubocop-ast (>= 1.12.0, < 2.0)
154
175
  ruby-progressbar (~> 1.7)
155
- unicode-display_width (~> 1.0, >= 1.0.1)
156
- ruby-macho (1.4.0)
157
- ruby-progressbar (1.10.1)
158
- safe_yaml (1.0.5)
176
+ unicode-display_width (>= 1.4.0, < 3.0)
177
+ rubocop-ast (1.12.0)
178
+ parser (>= 3.0.1.1)
179
+ ruby-macho (2.5.1)
180
+ ruby-progressbar (1.11.0)
181
+ ruby2_keywords (0.0.5)
159
182
  sassc (2.4.0)
160
183
  ffi (~> 1.9)
161
184
  sawyer (0.8.2)
162
185
  addressable (>= 2.3.5)
163
186
  faraday (> 0.8, < 2.0)
164
187
  sqlite3 (1.4.2)
165
- terminal-table (1.8.0)
166
- unicode-display_width (~> 1.1, >= 1.1.1)
167
- thread_safe (0.3.6)
188
+ terminal-table (3.0.2)
189
+ unicode-display_width (>= 1.1.1, < 3)
168
190
  typhoeus (1.4.0)
169
191
  ethon (>= 0.9.0)
170
- tzinfo (1.2.7)
171
- thread_safe (~> 0.1)
172
- unicode-display_width (1.7.0)
173
- webmock (3.8.3)
174
- addressable (>= 2.3.6)
192
+ tzinfo (2.0.4)
193
+ concurrent-ruby (~> 1.0)
194
+ unicode-display_width (2.1.0)
195
+ webmock (3.14.0)
196
+ addressable (>= 2.8.0)
175
197
  crack (>= 0.3.2)
176
198
  hashdiff (>= 0.4.0, < 2.0.0)
177
199
  xcinvoke (0.3.0)
178
200
  liferaft (~> 0.0.6)
179
- xcodeproj (1.17.0)
201
+ xcodeproj (1.21.0)
180
202
  CFPropertyList (>= 2.3.3, < 4.0)
181
203
  atomos (~> 0.1.3)
182
204
  claide (>= 1.0.2, < 2.0)
183
205
  colored2 (~> 3.1)
184
- nanaimo (~> 0.2.6)
206
+ nanaimo (~> 0.3.0)
207
+ rexml (~> 3.2.4)
208
+ zeitwerk (2.4.2)
185
209
 
186
210
  PLATFORMS
187
211
  ruby
188
212
 
189
213
  DEPENDENCIES
190
214
  bacon
191
- bundler (~> 1.7)
215
+ bundler (~> 2.1)
192
216
  clintegracon (= 0.7.0)
193
217
  danger
194
218
  diffy
@@ -197,8 +221,8 @@ DEPENDENCIES
197
221
  mocha-on-bacon
198
222
  prettybacon
199
223
  rake (~> 13.0)
200
- rubocop (= 0.49.0)
224
+ rubocop (~> 1.18)
201
225
  webmock
202
226
 
203
227
  BUNDLED WITH
204
- 1.17.3
228
+ 2.2.22
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![jazzy](images/logo.jpg)
2
2
 
3
- [![Build Status](https://circleci.com/gh/realm/jazzy.svg?style=svg)](https://circleci.com/gh/realm/jazzy)
3
+ [![Build Status](https://github.com/realm/jazzy/actions/workflows/Tests.yml/badge.svg)](https://github.com/realm/jazzy/actions/workflows/Tests.yml)
4
4
 
5
5
  *jazzy is a command-line utility that generates documentation for Swift or Objective-C*
6
6
 
@@ -8,13 +8,14 @@
8
8
 
9
9
  Both Swift and Objective-C projects are supported.
10
10
 
11
- *SwiftPM support was recently added, so please report any issues you find.*
12
-
13
11
  Instead of parsing your source files, `jazzy` hooks into [Clang][clang] and
14
12
  [SourceKit][sourcekit] to use the [AST][ast] representation of your code and
15
13
  its comments for more accurate results. The output matches the look and feel
16
14
  of Apple’s official reference documentation, post WWDC 2014.
17
15
 
16
+ Jazzy can also generate documentation from compiled Swift modules [using their
17
+ symbol graph](#docs-from-swiftmodules-or-frameworks) instead of source code.
18
+
18
19
  ![Screenshot](images/screenshot.jpg)
19
20
 
20
21
  This project adheres to the [Contributor Covenant Code of Conduct](https://realm.io/conduct).
@@ -49,17 +50,21 @@ succeed too!
49
50
 
50
51
  If Jazzy generates docs for the wrong module then use `--module` to tell it which
51
52
  one you'd prefer. If this doesn't help, and you're using Xcode, then try passing
52
- extra arguments to `xcodebuild`, for example `jazzy --build-tool-arguments -target,MyTarget`.
53
+ extra arguments to `xcodebuild`, for example
54
+ `jazzy --build-tool-arguments -scheme,MyScheme,-target,MyTarget`.
53
55
 
54
56
  You can set options for your project’s documentation in a configuration file,
55
57
  `.jazzy.yaml` by default. For a detailed explanation and an exhaustive list of
56
58
  all available options, run `jazzy --help config`.
57
59
 
58
- ### Supported keywords
60
+ ### Supported documentation keywords
59
61
 
60
62
  Swift documentation is written in markdown and supports a number of special keywords.
61
- For a complete list and examples, see Erica Sadun's post on [*Swift header documentation in Xcode 7*](https://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/),
62
- her [book on Swift Documentation Markup](https://itunes.apple.com/us/book/swift-documentation-markup/id1049010423), and the [Xcode Markup Formatting Reference](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/).
63
+ Here are some resources with tutorials and examples, starting with the most modern:
64
+ * Apple's [Writing Symbol Documentation in Your Source Files](https://developer.apple.com/documentation/xcode/writing-symbol-documentation-in-your-source-files) article.
65
+ * Apple's [Formatting Your Documentation Content](https://developer.apple.com/documentation/xcode/formatting-your-documentation-content) article.
66
+ * Apple's [Xcode Markup Formatting Reference](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/).
67
+ * Erica Sadun's [Swift header documentation in Xcode 7](https://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/) post and her [book on Swift Documentation Markup](https://itunes.apple.com/us/book/swift-documentation-markup/id1049010423).
63
68
 
64
69
  For Objective-C documentation the same keywords are supported, but note that the format
65
70
  is slightly different. In Swift you would write `- returns:`, but in Objective-C you write `@return`. See Apple's [*HeaderDoc User Guide*](https://developer.apple.com/legacy/library/documentation/DeveloperTools/Conceptual/HeaderDoc/tags/tags.html) for more details. **Note: `jazzy` currently does not support _all_ Objective-C keywords listed in this document, only @param, @return, @warning, @see, and @note.**
@@ -74,6 +79,12 @@ backticks generates a link, for example:
74
79
  * \`[MyClass method1]\` - a link to an Objective-C method.
75
80
  * \`-[MyClass method2:param1]\` - a link to another Objective-C method.
76
81
 
82
+ Jazzy understands Apple's DocC-style links too, for example:
83
+ * \`\`MyClass/method(param1:)\`\` - a link to the documentation for that method
84
+ that appears as just `method(param1:)` in the rendered page.
85
+ * \`\`\<doc:method(_:)-e873\>\`\` - a link to a specific overload of `method(_:)`.
86
+ Jazzy can't tell which overload you intend and links to the first one.
87
+
77
88
  ### Math
78
89
 
79
90
  Jazzy can render math equations written in LaTeX embedded in your markdown:
@@ -106,8 +117,9 @@ jazzy \
106
117
  --clean \
107
118
  --author Realm \
108
119
  --author_url https://realm.io \
109
- --github_url https://github.com/realm/realm-cocoa \
110
- --github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
120
+ --source-host github \
121
+ --source-host-url https://github.com/realm/realm-cocoa \
122
+ --source-host-files-url https://github.com/realm/realm-cocoa/tree/v0.96.2 \
111
123
  --module-version 0.96.2 \
112
124
  --build-tool-arguments -scheme,RealmSwift \
113
125
  --module RealmSwift \
@@ -148,8 +160,9 @@ jazzy \
148
160
  --clean \
149
161
  --author Realm \
150
162
  --author_url https://realm.io \
151
- --github_url https://github.com/realm/realm-cocoa \
152
- --github-file-prefix https://github.com/realm/realm-cocoa/tree/v2.2.0 \
163
+ --source-host github \
164
+ --source-host-url https://github.com/realm/realm-cocoa \
165
+ --source-host-files-url https://github.com/realm/realm-cocoa/tree/v2.2.0 \
153
166
  --module-version 2.2.0 \
154
167
  --build-tool-arguments --objc,Realm/Realm.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd) \
155
168
  --module Realm \
@@ -165,8 +178,9 @@ jazzy \
165
178
  --objc \
166
179
  --author AFNetworking \
167
180
  --author_url http://afnetworking.com \
168
- --github_url https://github.com/AFNetworking/AFNetworking \
169
- --github-file-prefix https://github.com/AFNetworking/AFNetworking/tree/2.6.2 \
181
+ --source-host github \
182
+ --source-host-url https://github.com/AFNetworking/AFNetworking \
183
+ --source-host-files-url https://github.com/AFNetworking/AFNetworking/tree/2.6.2 \
170
184
  --module-version 2.6.2 \
171
185
  --umbrella-header AFNetworking/AFNetworking.h \
172
186
  --framework-root . \
@@ -200,6 +214,57 @@ sourcekitten doc --objc $(pwd)/MyProject/MyProject.h \
200
214
  jazzy --sourcekitten-sourcefile swiftDoc.json,objcDoc.json
201
215
  ```
202
216
 
217
+ ### Docs from `.swiftmodule`s or frameworks
218
+
219
+ *This feature is new and relies on a new Swift feature: there may be crashes
220
+ and mistakes: reports welcome.*
221
+
222
+ Swift 5.3 adds support for symbol graph generation from `.swiftmodule` files.
223
+ This looks to be part of Apple's toolchain for generating their online docs.
224
+
225
+ Jazzy can use this to generate API documentation. This is faster than using
226
+ the source code directly but does have limitations: for example documentation
227
+ comments are available only for `public` declarations, and the presentation of
228
+ Swift extensions may not match the way they are written in code.
229
+
230
+ Some examples:
231
+
232
+ 1. Generate docs for the Apple Combine framework for macOS:
233
+ ```shell
234
+ jazzy --module Combine --swift-build-tool symbolgraph
235
+ ```
236
+ The SDK's library directories are included in the search path by
237
+ default.
238
+ 2. Same but for iOS:
239
+ ```shell
240
+ jazzy --module Combine --swift-build-tool symbolgraph
241
+ --sdk iphoneos
242
+ --build-tool-arguments -target,arm64-apple-ios14.1
243
+ ```
244
+ The `target` is the LLVM target triple and needs to match the SDK. The
245
+ default here is the target of the host system that Jazzy is running on,
246
+ something like `x86_64-apple-darwin19.6.0`.
247
+ 3. Generate docs for a personal `.swiftmodule`:
248
+ ```shell
249
+ jazzy --module MyMod --swift-build-tool symbolgraph
250
+ --build-tool-arguments -I,/Build/Products
251
+ ```
252
+ This implies that `/Build/Products/MyMod.swiftmodule` exists. Jazzy's
253
+ `--source-directory` (default current directory) is searched by default,
254
+ so you only need the `-I` override if that's not enough.
255
+ 4. For a personal framework:
256
+ ```shell
257
+ jazzy --module MyMod --swift-build-tool symbolgraph
258
+ --build-tool-arguments -F,/Build/Products
259
+ ```
260
+ This implies that `/Build/Products/MyMod.framework` exists and contains
261
+ a `.swiftmodule`. Again the `--source-directory` is searched by default
262
+ if `-F` is not passed in.
263
+
264
+ See `swift symbolgraph-extract -help` for all the things you can pass via
265
+ `--build-tool-arguments`: if your module has dependencies then you may need
266
+ to add various search path options to let Swift load it.
267
+
203
268
  ### Themes
204
269
 
205
270
  Three themes are provided with jazzy: `apple` (default), `fullwidth` and `jony`.
@@ -253,6 +318,9 @@ In Swift mode, Jazzy by default documents only `public` and `open` declarations.
253
318
  include declarations with a lower access level, set the `--min-acl` flag to `internal`,
254
319
  `fileprivate`, or `private`.
255
320
 
321
+ By default, Jazzy does not document declarations marked `@_spi` when `--min-acl` is
322
+ set to `public` or `open`. Set the `--include-spi-declarations` flag to include them.
323
+
256
324
  In Objective-C mode, Jazzy documents all declarations found in the `--umbrella-header`
257
325
  header file and any other header files included by it.
258
326
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #-- Bootstrap --------------------------------------------------------------#
2
4
 
3
5
  desc 'Initializes your working copy to run the specs'
@@ -9,7 +11,7 @@ task :bootstrap do
9
11
  title 'Updating submodules'
10
12
  sh 'git submodule update --init --recursive'
11
13
  else
12
- $stderr.puts "\033[0;31m" \
14
+ warn "\033[0;31m" \
13
15
  "[!] Please install the bundler gem manually:\n" \
14
16
  ' $ [sudo] gem install bundler' \
15
17
  "\e[0m"
@@ -95,7 +97,7 @@ begin
95
97
 
96
98
  desc 'Runs RuboCop linter on Ruby files'
97
99
  task :rubocop do
98
- sh 'bundle exec rubocop lib spec'
100
+ sh 'bundle exec rubocop'
99
101
  end
100
102
 
101
103
  #-- SourceKitten -----------------------------------------------------------#
@@ -115,20 +117,20 @@ begin
115
117
  'jquery/dist/jquery.min.js' => [
116
118
  'themes/apple/assets/js',
117
119
  'themes/fullwidth/assets/js',
118
- 'themes/jony/assets/js'
120
+ 'themes/jony/assets/js',
119
121
  ],
120
122
  'lunr/lunr.min.js' => [
121
123
  'themes/apple/assets/js',
122
- 'themes/fullwidth/assets/js'
124
+ 'themes/fullwidth/assets/js',
123
125
  ],
124
126
  'corejs-typeahead/dist/typeahead.jquery.js' => [
125
127
  'themes/apple/assets/js',
126
- 'themes/fullwidth/assets/js'
128
+ 'themes/fullwidth/assets/js',
127
129
  ],
128
130
  'katex/dist/katex.min.css' => ['extensions/katex/css'],
129
131
  'katex/dist/fonts' => ['extensions/katex/css'],
130
- 'katex/dist/katex.min.js' => ['extensions/katex/js']
131
- }
132
+ 'katex/dist/katex.min.js' => ['extensions/katex/js'],
133
+ }.freeze
132
134
 
133
135
  desc 'Copies theme dependencies (`npm update/install` by hand first)'
134
136
  task :theme_deps do
@@ -138,15 +140,14 @@ begin
138
140
  end
139
141
  end
140
142
  end
141
-
142
143
  rescue LoadError, NameError => e
143
- $stderr.puts "\033[0;31m" \
144
+ warn "\033[0;31m" \
144
145
  '[!] Some Rake tasks haven been disabled because the environment' \
145
146
  ' couldn’t be loaded. Be sure to run `rake bootstrap` first.' \
146
147
  "\e[0m"
147
- $stderr.puts e.message
148
- $stderr.puts e.backtrace
149
- $stderr.puts
148
+ warn e.message
149
+ warn e.backtrace
150
+ warn ''
150
151
  end
151
152
 
152
153
  #-- Helpers ------------------------------------------------------------------#
data/bin/jazzy CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  if $PROGRAM_NAME == __FILE__ && !ENV['JAZZY_NO_BUNDLER']
4
- ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
5
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', __dir__)
5
6
  require 'rubygems'
6
7
  require 'bundler/setup'
7
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
8
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
8
9
  elsif ENV['JAZZY_NO_BUNDLER']
9
10
  require 'rubygems'
10
11
  gem 'jazzy'
data/bin/sourcekitten CHANGED
Binary file
data/jazzy.gemspec CHANGED
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  require File.expand_path('lib/jazzy/gem_version.rb', File.dirname(__FILE__))
4
5
 
@@ -9,25 +10,26 @@ Gem::Specification.new do |spec|
9
10
  spec.email = ['jp@jpsim.com']
10
11
  spec.summary = 'Soulful docs for Swift & Objective-C.'
11
12
  spec.description = 'Soulful docs for Swift & Objective-C. ' \
12
- "Run in your Xcode project's root directory for " \
13
- 'instant HTML docs.'
13
+ "Run in your Xcode project's root directory for " \
14
+ 'instant HTML docs.'
14
15
  spec.homepage = 'https://github.com/realm/jazzy'
15
16
  spec.license = 'MIT'
16
17
 
17
18
  spec.files = `git ls-files`.split($/)
18
- spec.executables << 'jazzy'
19
+ spec.executables << 'jazzy'
19
20
 
20
21
  spec.add_runtime_dependency 'cocoapods', '~> 1.5'
21
22
  spec.add_runtime_dependency 'mustache', '~> 1.1'
22
- spec.add_runtime_dependency 'open4'
23
+ spec.add_runtime_dependency 'open4', '~> 1.3'
23
24
  spec.add_runtime_dependency 'redcarpet', '~> 3.4'
25
+ spec.add_runtime_dependency 'rexml', '~> 3.2'
24
26
  spec.add_runtime_dependency 'rouge', ['>= 2.0.6', '< 4.0']
25
27
  spec.add_runtime_dependency 'sassc', '~> 2.1'
26
28
  spec.add_runtime_dependency 'sqlite3', '~> 1.3'
27
29
  spec.add_runtime_dependency 'xcinvoke', '~> 0.3.0'
28
30
 
29
- spec.add_development_dependency 'bundler', '~> 1.7'
31
+ spec.add_development_dependency 'bundler', '~> 2.1'
30
32
  spec.add_development_dependency 'rake', '~> 13.0'
31
33
 
32
- spec.required_ruby_version = '>= 2.0.0'
34
+ spec.required_ruby_version = '>= 2.6.3'
33
35
  end
data/js/package-lock.json CHANGED
@@ -1,39 +1,44 @@
1
1
  {
2
- "name": "jazzy-js",
3
- "version": "1.0.0",
4
- "lockfileVersion": 1,
2
+ "lockfileVersion": 2,
5
3
  "requires": true,
6
- "dependencies": {
7
- "commander": {
8
- "version": "2.20.3",
9
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
10
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
4
+ "packages": {
5
+ "node_modules/commander": {
6
+ "version": "6.2.1",
7
+ "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
8
+ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
9
+ "engines": {
10
+ "node": ">= 6"
11
+ }
11
12
  },
12
- "corejs-typeahead": {
13
+ "node_modules/corejs-typeahead": {
13
14
  "version": "1.3.1",
14
15
  "resolved": "https://registry.npmjs.org/corejs-typeahead/-/corejs-typeahead-1.3.1.tgz",
15
16
  "integrity": "sha512-fyNlBNWJNL6EQUnJyAunEzBzRcwR2cEHtZXBi2pndHPOJ/wpOf3wbS+/Oh+kYYS5sKowQcs0LFwMSl6Y2Xeqkw==",
16
- "requires": {
17
+ "dependencies": {
17
18
  "jquery": ">=1.11"
18
19
  }
19
20
  },
20
- "jquery": {
21
- "version": "3.5.1",
22
- "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
23
- "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
21
+ "node_modules/jquery": {
22
+ "version": "3.6.0",
23
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
24
+ "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
24
25
  },
25
- "katex": {
26
- "version": "0.11.1",
27
- "resolved": "https://registry.npmjs.org/katex/-/katex-0.11.1.tgz",
28
- "integrity": "sha512-5oANDICCTX0NqYIyAiFCCwjQ7ERu3DQG2JFHLbYOf+fXaMoH8eg/zOq5WSYJsKMi/QebW+Eh3gSM+oss1H/bww==",
29
- "requires": {
30
- "commander": "^2.19.0"
26
+ "node_modules/katex": {
27
+ "version": "0.13.5",
28
+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.13.5.tgz",
29
+ "integrity": "sha512-n2uEzFpNFUOAlWs0eCgmT82LQyP+BlS45yBgnLRqe+ENp3+FEM3lM+cJwZwwxxONFgayyq1fm6n+w35vo2MaUg==",
30
+ "dependencies": {
31
+ "commander": "^6.0.0"
32
+ },
33
+ "bin": {
34
+ "katex": "cli.js"
31
35
  }
32
36
  },
33
- "lunr": {
34
- "version": "2.3.8",
35
- "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz",
36
- "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg=="
37
+ "node_modules/lunr": {
38
+ "version": "2.3.9",
39
+ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",
40
+ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="
37
41
  }
38
- }
42
+ },
43
+ "dependencies": {}
39
44
  }