jazzy 0.13.4 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/Tests.yml +52 -0
  3. data/.rubocop.yml +123 -24
  4. data/CHANGELOG.md +103 -0
  5. data/CONTRIBUTING.md +5 -5
  6. data/Dangerfile +11 -8
  7. data/Gemfile +3 -1
  8. data/Gemfile.lock +91 -69
  9. data/README.md +85 -13
  10. data/Rakefile +19 -13
  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.rb +2 -0
  17. data/lib/jazzy/config.rb +124 -70
  18. data/lib/jazzy/doc.rb +3 -1
  19. data/lib/jazzy/doc_builder.rb +75 -81
  20. data/lib/jazzy/docset_builder.rb +3 -1
  21. data/lib/jazzy/documentation_generator.rb +6 -2
  22. data/lib/jazzy/executable.rb +3 -0
  23. data/lib/jazzy/extensions/bitbucket/img/bitbucket.svg +11 -0
  24. data/lib/jazzy/{themes/apple/assets → extensions/github}/img/gh.png +0 -0
  25. data/lib/jazzy/extensions/gitlab/img/gitlab.svg +23 -0
  26. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
  27. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff +0 -0
  28. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  29. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  30. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  31. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  32. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  33. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  34. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  35. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  36. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  37. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  38. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  39. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  40. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  41. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.ttf +0 -0
  42. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.woff +0 -0
  43. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
  44. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  45. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  46. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  47. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.ttf +0 -0
  48. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.woff +0 -0
  49. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
  50. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.ttf +0 -0
  51. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.woff +0 -0
  52. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
  53. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  54. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  55. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  56. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.ttf +0 -0
  57. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.woff +0 -0
  58. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
  59. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  60. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  61. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  62. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  63. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  64. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  65. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  66. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  67. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  68. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.ttf +0 -0
  69. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.woff +0 -0
  70. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
  71. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
  72. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.woff +0 -0
  73. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  74. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
  75. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.woff +0 -0
  76. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  77. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
  78. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.woff +0 -0
  79. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  80. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
  81. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.woff +0 -0
  82. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  83. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  84. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  85. data/lib/jazzy/extensions/katex/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  86. data/lib/jazzy/extensions/katex/css/katex.min.css +1 -1
  87. data/lib/jazzy/extensions/katex/js/katex.min.js +1 -1
  88. data/lib/jazzy/gem_version.rb +3 -1
  89. data/lib/jazzy/highlighter.rb +5 -3
  90. data/lib/jazzy/jazzy_markdown.rb +101 -30
  91. data/lib/jazzy/podspec_documenter.rb +14 -16
  92. data/lib/jazzy/search_builder.rb +4 -3
  93. data/lib/jazzy/source_declaration.rb +24 -5
  94. data/lib/jazzy/source_declaration/access_control_level.rb +7 -5
  95. data/lib/jazzy/source_declaration/type.rb +33 -1
  96. data/lib/jazzy/source_document.rb +8 -5
  97. data/lib/jazzy/source_host.rb +111 -0
  98. data/lib/jazzy/source_mark.rb +8 -6
  99. data/lib/jazzy/source_module.rb +6 -6
  100. data/lib/jazzy/sourcekitten.rb +105 -79
  101. data/lib/jazzy/stats.rb +4 -2
  102. data/lib/jazzy/symbol_graph.rb +95 -0
  103. data/lib/jazzy/symbol_graph/constraint.rb +98 -0
  104. data/lib/jazzy/symbol_graph/ext_node.rb +116 -0
  105. data/lib/jazzy/symbol_graph/graph.rb +195 -0
  106. data/lib/jazzy/symbol_graph/relationship.rb +42 -0
  107. data/lib/jazzy/symbol_graph/sym_node.rb +163 -0
  108. data/lib/jazzy/symbol_graph/symbol.rb +222 -0
  109. data/lib/jazzy/themes/apple/assets/css/highlight.css.scss +63 -59
  110. data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +101 -4
  111. data/lib/jazzy/themes/apple/assets/img/spinner.gif +0 -0
  112. data/lib/jazzy/themes/apple/assets/js/jazzy.js +4 -0
  113. data/lib/jazzy/themes/apple/assets/js/jazzy.search.js +74 -0
  114. data/lib/jazzy/themes/apple/assets/js/jquery.min.js +2 -2
  115. data/lib/jazzy/themes/apple/assets/js/lunr.min.js +6 -0
  116. data/lib/jazzy/themes/apple/assets/js/typeahead.jquery.js +1694 -0
  117. data/lib/jazzy/themes/apple/templates/doc.mustache +35 -0
  118. data/lib/jazzy/themes/apple/templates/footer.mustache +1 -1
  119. data/lib/jazzy/themes/apple/templates/header.mustache +10 -3
  120. data/lib/jazzy/themes/apple/templates/task.mustache +4 -4
  121. data/lib/jazzy/themes/fullwidth/assets/css/highlight.css.scss +63 -59
  122. data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +11 -2
  123. data/lib/jazzy/themes/fullwidth/assets/js/jazzy.js +4 -0
  124. data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +4 -0
  125. data/lib/jazzy/themes/fullwidth/assets/js/jquery.min.js +2 -2
  126. data/lib/jazzy/themes/fullwidth/assets/js/lunr.min.js +3 -3
  127. data/lib/jazzy/themes/fullwidth/templates/doc.mustache +30 -0
  128. data/lib/jazzy/themes/fullwidth/templates/footer.mustache +1 -1
  129. data/lib/jazzy/themes/fullwidth/templates/header.mustache +5 -5
  130. data/lib/jazzy/themes/fullwidth/templates/task.mustache +4 -4
  131. data/lib/jazzy/themes/jony/assets/css/highlight.css.scss +63 -59
  132. data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +34 -2
  133. data/lib/jazzy/themes/jony/assets/js/jazzy.js +4 -0
  134. data/lib/jazzy/themes/jony/assets/js/jquery.min.js +2 -2
  135. data/lib/jazzy/themes/jony/templates/doc.mustache +30 -0
  136. data/lib/jazzy/themes/jony/templates/footer.mustache +1 -1
  137. data/lib/jazzy/themes/jony/templates/header.mustache +5 -5
  138. data/lib/jazzy/themes/jony/templates/task.mustache +4 -4
  139. data/spec/integration_spec.rb +54 -42
  140. data/spec/spec_helper.rb +3 -1
  141. data/spec/spec_helper/pre_flight.rb +2 -0
  142. metadata +43 -19
  143. data/.circleci/config.yml +0 -83
  144. data/lib/jazzy/themes/fullwidth/assets/img/gh.png +0 -0
  145. data/lib/jazzy/themes/jony/assets/img/gh.png +0 -0
  146. data/spec/sourcekitten_spec.rb +0 -6
data/Gemfile CHANGED
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
4
6
 
5
7
  group :development do
6
8
  # Code style
7
- gem 'rubocop', '0.49.0'
9
+ gem 'rubocop', '~> 1.18'
8
10
 
9
11
  # Tests
10
12
  gem 'bacon'
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.13.4)
4
+ jazzy (0.14.0)
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,18 @@ 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)
18
+ CFPropertyList (3.0.3)
19
+ activesupport (5.2.6)
20
+ concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ i18n (>= 0.7, < 2)
20
22
  minitest (~> 5.1)
21
- thread_safe (~> 0.3, >= 0.3.4)
22
23
  tzinfo (~> 1.1)
23
- addressable (2.7.0)
24
+ addressable (2.8.0)
24
25
  public_suffix (>= 2.0.2, < 5.0)
25
- algoliasearch (1.27.2)
26
+ algoliasearch (1.27.5)
26
27
  httpclient (~> 2.8, >= 2.8.3)
27
28
  json (>= 1.5.1)
28
- ast (2.4.0)
29
+ ast (2.4.2)
29
30
  atomos (0.1.3)
30
31
  bacon (1.2.0)
31
32
  claide (1.0.3)
@@ -36,15 +37,14 @@ GEM
36
37
  clintegracon (0.7.0)
37
38
  colored (~> 1.2)
38
39
  diffy
39
- cocoapods (1.9.3)
40
- activesupport (>= 4.0.2, < 5)
40
+ cocoapods (1.10.2)
41
+ addressable (~> 2.6)
41
42
  claide (>= 1.0.2, < 2.0)
42
- cocoapods-core (= 1.9.3)
43
+ cocoapods-core (= 1.10.2)
43
44
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
44
- cocoapods-downloader (>= 1.2.2, < 2.0)
45
+ cocoapods-downloader (>= 1.4.0, < 2.0)
45
46
  cocoapods-plugins (>= 1.0.0, < 2.0)
46
47
  cocoapods-search (>= 1.0.0, < 2.0)
47
- cocoapods-stats (>= 1.0.0, < 2.0)
48
48
  cocoapods-trunk (>= 1.4.0, < 2.0)
49
49
  cocoapods-try (>= 1.1.0, < 2.0)
50
50
  colored2 (~> 3.1)
@@ -54,33 +54,34 @@ GEM
54
54
  molinillo (~> 0.6.6)
55
55
  nap (~> 1.0)
56
56
  ruby-macho (~> 1.4)
57
- xcodeproj (>= 1.14.0, < 2.0)
58
- cocoapods-core (1.9.3)
59
- activesupport (>= 4.0.2, < 6)
57
+ xcodeproj (>= 1.19.0, < 2.0)
58
+ cocoapods-core (1.10.2)
59
+ activesupport (> 5.0, < 6)
60
+ addressable (~> 2.6)
60
61
  algoliasearch (~> 1.0)
61
62
  concurrent-ruby (~> 1.1)
62
63
  fuzzy_match (~> 2.0.4)
63
64
  nap (~> 1.0)
64
65
  netrc (~> 0.11)
66
+ public_suffix
65
67
  typhoeus (~> 1.0)
66
68
  cocoapods-deintegrate (1.0.4)
67
- cocoapods-downloader (1.3.0)
69
+ cocoapods-downloader (1.4.0)
68
70
  cocoapods-plugins (1.0.0)
69
71
  nap
70
- cocoapods-search (1.0.0)
71
- cocoapods-stats (1.1.0)
72
+ cocoapods-search (1.0.1)
72
73
  cocoapods-trunk (1.5.0)
73
74
  nap (>= 0.8, < 2.0)
74
75
  netrc (~> 0.11)
75
76
  cocoapods-try (1.2.0)
76
77
  colored (1.2)
77
78
  colored2 (3.1.2)
78
- concurrent-ruby (1.1.6)
79
+ concurrent-ruby (1.1.9)
79
80
  cork (0.3.0)
80
81
  colored2 (~> 3.1)
81
- crack (0.4.3)
82
- safe_yaml (~> 1.0.0)
83
- danger (8.0.0)
82
+ crack (0.4.5)
83
+ rexml
84
+ danger (8.3.1)
84
85
  claide (~> 1.0)
85
86
  claide-plugins (>= 0.9.2)
86
87
  colored2 (~> 3.1)
@@ -88,107 +89,128 @@ GEM
88
89
  faraday (>= 0.9.0, < 2.0)
89
90
  faraday-http-cache (~> 2.0)
90
91
  git (~> 1.7)
91
- kramdown (~> 2.0)
92
+ kramdown (~> 2.3)
92
93
  kramdown-parser-gfm (~> 1.0)
93
94
  no_proxy_fix
94
95
  octokit (~> 4.7)
95
- terminal-table (~> 1)
96
- diffy (3.3.0)
96
+ terminal-table (>= 1, < 4)
97
+ diffy (3.4.0)
97
98
  escape (0.0.4)
98
- ethon (0.12.0)
99
- ffi (>= 1.3.0)
100
- faraday (1.0.1)
99
+ ethon (0.14.0)
100
+ ffi (>= 1.15.0)
101
+ faraday (1.7.0)
102
+ faraday-em_http (~> 1.0)
103
+ faraday-em_synchrony (~> 1.0)
104
+ faraday-excon (~> 1.1)
105
+ faraday-httpclient (~> 1.0.1)
106
+ faraday-net_http (~> 1.0)
107
+ faraday-net_http_persistent (~> 1.1)
108
+ faraday-patron (~> 1.0)
109
+ faraday-rack (~> 1.0)
101
110
  multipart-post (>= 1.2, < 3)
111
+ ruby2_keywords (>= 0.0.4)
112
+ faraday-em_http (1.0.0)
113
+ faraday-em_synchrony (1.0.0)
114
+ faraday-excon (1.1.0)
102
115
  faraday-http-cache (2.2.0)
103
116
  faraday (>= 0.8)
104
- ffi (1.12.2)
117
+ faraday-httpclient (1.0.1)
118
+ faraday-net_http (1.0.1)
119
+ faraday-net_http_persistent (1.2.0)
120
+ faraday-patron (1.0.0)
121
+ faraday-rack (1.0.0)
122
+ ffi (1.15.3)
105
123
  fourflusher (2.3.1)
106
124
  fuzzy_match (2.0.4)
107
125
  gh_inspector (1.1.3)
108
- git (1.7.0)
126
+ git (1.9.1)
109
127
  rchardet (~> 1.8)
110
128
  hashdiff (1.0.1)
111
129
  httpclient (2.8.3)
112
- i18n (0.9.5)
130
+ i18n (1.8.10)
113
131
  concurrent-ruby (~> 1.0)
114
- json (2.3.0)
115
- kramdown (2.2.1)
132
+ json (2.5.1)
133
+ kramdown (2.3.1)
116
134
  rexml
117
135
  kramdown-parser-gfm (1.1.0)
118
136
  kramdown (~> 2.0)
119
137
  liferaft (0.0.6)
120
- minitest (5.14.1)
121
- mocha (1.11.2)
138
+ minitest (5.14.4)
139
+ mocha (1.13.0)
122
140
  mocha-on-bacon (0.2.3)
123
141
  mocha (>= 0.13.0)
124
142
  molinillo (0.6.6)
125
143
  multipart-post (2.1.1)
126
144
  mustache (1.1.1)
127
- nanaimo (0.2.6)
145
+ nanaimo (0.3.0)
128
146
  nap (1.1.0)
129
147
  netrc (0.11.0)
130
148
  no_proxy_fix (0.1.2)
131
- octokit (4.18.0)
149
+ octokit (4.21.0)
132
150
  faraday (>= 0.9)
133
151
  sawyer (~> 0.8.0, >= 0.5.3)
134
152
  open4 (1.3.4)
135
- parallel (1.19.1)
136
- parser (2.7.1.3)
137
- ast (~> 2.4.0)
138
- powerpack (0.1.2)
153
+ parallel (1.20.1)
154
+ parser (3.0.2.0)
155
+ ast (~> 2.4.1)
139
156
  prettybacon (0.0.2)
140
157
  bacon (~> 1.2)
141
- public_suffix (4.0.5)
142
- rainbow (2.2.2)
143
- rake
144
- rake (13.0.1)
158
+ public_suffix (4.0.6)
159
+ rainbow (3.0.0)
160
+ rake (13.0.6)
145
161
  rchardet (1.8.0)
146
- redcarpet (3.5.0)
147
- rexml (3.2.4)
148
- rouge (3.19.0)
149
- rubocop (0.49.0)
162
+ redcarpet (3.5.1)
163
+ regexp_parser (2.1.1)
164
+ rexml (3.2.5)
165
+ rouge (3.26.0)
166
+ rubocop (1.19.0)
150
167
  parallel (~> 1.10)
151
- parser (>= 2.3.3.1, < 3.0)
152
- powerpack (~> 0.1)
153
- rainbow (>= 1.99.1, < 3.0)
168
+ parser (>= 3.0.0.0)
169
+ rainbow (>= 2.2.2, < 4.0)
170
+ regexp_parser (>= 1.8, < 3.0)
171
+ rexml
172
+ rubocop-ast (>= 1.9.1, < 2.0)
154
173
  ruby-progressbar (~> 1.7)
155
- unicode-display_width (~> 1.0, >= 1.0.1)
174
+ unicode-display_width (>= 1.4.0, < 3.0)
175
+ rubocop-ast (1.10.0)
176
+ parser (>= 3.0.1.1)
156
177
  ruby-macho (1.4.0)
157
- ruby-progressbar (1.10.1)
158
- safe_yaml (1.0.5)
159
- sassc (2.3.0)
178
+ ruby-progressbar (1.11.0)
179
+ ruby2_keywords (0.0.5)
180
+ sassc (2.4.0)
160
181
  ffi (~> 1.9)
161
182
  sawyer (0.8.2)
162
183
  addressable (>= 2.3.5)
163
184
  faraday (> 0.8, < 2.0)
164
185
  sqlite3 (1.4.2)
165
- terminal-table (1.8.0)
166
- unicode-display_width (~> 1.1, >= 1.1.1)
186
+ terminal-table (3.0.1)
187
+ unicode-display_width (>= 1.1.1, < 3)
167
188
  thread_safe (0.3.6)
168
189
  typhoeus (1.4.0)
169
190
  ethon (>= 0.9.0)
170
- tzinfo (1.2.7)
191
+ tzinfo (1.2.9)
171
192
  thread_safe (~> 0.1)
172
- unicode-display_width (1.7.0)
173
- webmock (3.8.3)
174
- addressable (>= 2.3.6)
193
+ unicode-display_width (2.0.0)
194
+ webmock (3.14.0)
195
+ addressable (>= 2.8.0)
175
196
  crack (>= 0.3.2)
176
197
  hashdiff (>= 0.4.0, < 2.0.0)
177
198
  xcinvoke (0.3.0)
178
199
  liferaft (~> 0.0.6)
179
- xcodeproj (1.16.0)
200
+ xcodeproj (1.21.0)
180
201
  CFPropertyList (>= 2.3.3, < 4.0)
181
202
  atomos (~> 0.1.3)
182
203
  claide (>= 1.0.2, < 2.0)
183
204
  colored2 (~> 3.1)
184
- nanaimo (~> 0.2.6)
205
+ nanaimo (~> 0.3.0)
206
+ rexml (~> 3.2.4)
185
207
 
186
208
  PLATFORMS
187
209
  ruby
188
210
 
189
211
  DEPENDENCIES
190
212
  bacon
191
- bundler (~> 1.7)
213
+ bundler (~> 2.1)
192
214
  clintegracon (= 0.7.0)
193
215
  danger
194
216
  diffy
@@ -197,8 +219,8 @@ DEPENDENCIES
197
219
  mocha-on-bacon
198
220
  prettybacon
199
221
  rake (~> 13.0)
200
- rubocop (= 0.49.0)
222
+ rubocop (~> 1.18)
201
223
  webmock
202
224
 
203
225
  BUNDLED WITH
204
- 1.17.3
226
+ 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`.
@@ -281,6 +346,13 @@ Note that the `--include` option is applied before the `--exclude` option. For e
281
346
  Declarations with a documentation comment containing `:nodoc:` are excluded from the
282
347
  documentation.
283
348
 
349
+ ### Documentation structure
350
+
351
+ By default Jazzy does not create separate web pages for declarations that do
352
+ not have any members: instead they are nested into some parent page. Use the
353
+ `--separate-global-declarations` flag to change this and always create pages
354
+ for declarations that can be directly accessed from client code.
355
+
284
356
  ### Choosing the Swift language version
285
357
 
286
358
  Jazzy normally uses the Swift compiler from the Xcode currently configured by