jazzy 0.10.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -20
- data/CHANGELOG.md +139 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile.lock +36 -37
- data/README.md +67 -9
- data/bin/sourcekitten +0 -0
- data/jazzy.gemspec +1 -1
- data/lib/jazzy/config.rb +45 -9
- data/lib/jazzy/doc.rb +0 -4
- data/lib/jazzy/doc_builder.rb +17 -24
- data/lib/jazzy/docset_builder.rb +1 -1
- data/lib/jazzy/gem_version.rb +1 -1
- data/lib/jazzy/highlighter.rb +10 -8
- data/lib/jazzy/jazzy_markdown.rb +4 -5
- data/lib/jazzy/source_declaration.rb +66 -6
- data/lib/jazzy/source_declaration/type.rb +8 -0
- data/lib/jazzy/source_document.rb +3 -2
- data/lib/jazzy/source_mark.rb +11 -0
- data/lib/jazzy/sourcekitten.rb +261 -109
- data/lib/jazzy/stats.rb +4 -0
- data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +36 -2
- data/lib/jazzy/themes/apple/assets/js/jquery.min.js +2 -2
- data/lib/jazzy/themes/apple/templates/task.mustache +4 -3
- data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +35 -7
- data/lib/jazzy/themes/fullwidth/assets/js/jquery.min.js +2 -2
- data/lib/jazzy/themes/fullwidth/templates/doc.mustache +1 -1
- data/lib/jazzy/themes/fullwidth/templates/task.mustache +4 -3
- data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +35 -2
- data/lib/jazzy/themes/jony/assets/js/jquery.min.js +2 -2
- data/lib/jazzy/themes/jony/templates/task.mustache +4 -3
- data/spec/integration_spec.rb +25 -11
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d55202d57dfdb0b3aad10b90f122d34e10a529bf73dde92ce2d0063473c011fe
|
4
|
+
data.tar.gz: 221dd32f5dac077431fe1d449b857966b2b9dcfc8a5f4cd0cefd61e1862558c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf1b7616ead246ea0e45a0c1e3148fc8cf3a04600c295c5bec0c7b5cff530296b9deb50f6b9c429940c1bf12dce036d4863038e55b3f892e748e5e99e7f3fc65
|
7
|
+
data.tar.gz: e7725d323d9550f97f27a6bd2e0c89d674cda5d4199dc6433e38f7b78e01f58388d8af8842c28293abb9ce4434068e24fbf1483941e2ab771787db7220dd788a
|
data/.circleci/config.yml
CHANGED
@@ -12,25 +12,16 @@ aliases:
|
|
12
12
|
BUNDLE_RETRY: 3
|
13
13
|
BUNDLE_PATH: vendor/bundle
|
14
14
|
|
15
|
-
- &shell
|
16
|
-
/bin/bash --login -eo pipefail
|
17
|
-
|
18
|
-
- &set-ruby-version
|
19
|
-
echo "ruby-2.4" > ~/.ruby-version
|
20
|
-
|
21
15
|
version: 2
|
22
16
|
jobs:
|
23
17
|
|
24
18
|
swift:
|
25
19
|
macos:
|
26
|
-
xcode: "
|
20
|
+
xcode: "11.2.0"
|
27
21
|
environment: *bundler-environment
|
28
|
-
# Used to invoke chruby
|
29
|
-
shell: *shell
|
30
22
|
steps:
|
31
23
|
- checkout
|
32
24
|
- restore_cache: *restore-mac-bundler-cache
|
33
|
-
- run: *set-ruby-version
|
34
25
|
- run: bundle install
|
35
26
|
- run: git submodule update --init --recursive
|
36
27
|
- run: bundle exec rake swift_spec
|
@@ -38,14 +29,11 @@ jobs:
|
|
38
29
|
|
39
30
|
objc:
|
40
31
|
macos:
|
41
|
-
xcode: "
|
32
|
+
xcode: "11.2.0"
|
42
33
|
environment: *bundler-environment
|
43
|
-
# Used to invoke chruby
|
44
|
-
shell: *shell
|
45
34
|
steps:
|
46
35
|
- checkout
|
47
36
|
- restore_cache: *restore-mac-bundler-cache
|
48
|
-
- run: *set-ruby-version
|
49
37
|
- run: bundle install
|
50
38
|
- run: git submodule update --init --recursive
|
51
39
|
- run: bundle exec rake objc_spec
|
@@ -53,16 +41,13 @@ jobs:
|
|
53
41
|
|
54
42
|
cocoapods:
|
55
43
|
macos:
|
56
|
-
xcode: "
|
44
|
+
xcode: "11.2.0"
|
57
45
|
environment: *bundler-environment
|
58
|
-
# Used to invoke chruby
|
59
|
-
shell: *shell
|
60
46
|
steps:
|
61
47
|
- checkout
|
62
48
|
- restore_cache:
|
63
49
|
key: cocoapods
|
64
50
|
- restore_cache: *restore-mac-bundler-cache
|
65
|
-
- run: *set-ruby-version
|
66
51
|
- run: bundle install
|
67
52
|
- run: git submodule update --init --recursive
|
68
53
|
- run: bundle exec rake cocoapods_spec
|
@@ -76,8 +61,6 @@ jobs:
|
|
76
61
|
docker:
|
77
62
|
- image: circleci/ruby:2.4-node
|
78
63
|
environment: *bundler-environment
|
79
|
-
# Used to invoke chruby
|
80
|
-
shell: *shell
|
81
64
|
steps:
|
82
65
|
- checkout
|
83
66
|
- restore_cache:
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,142 @@
|
|
1
|
+
## 0.13.0
|
2
|
+
|
3
|
+
##### Breaking
|
4
|
+
|
5
|
+
* None.
|
6
|
+
|
7
|
+
##### Enhancements
|
8
|
+
|
9
|
+
* Add section headings for members added by Swift conditional conformances.
|
10
|
+
[John Fairhurst](https://github.com/johnfairh)
|
11
|
+
[#717](https://github.com/realm/jazzy/issues/717)
|
12
|
+
|
13
|
+
* Parse markdown in MARK comments, make the html available to themes via
|
14
|
+
`name_html` mustache tag key for section headings.
|
15
|
+
[John Fairhurst](https://github.com/johnfairh)
|
16
|
+
|
17
|
+
* Include protocol conformances added by extensions in Swift docs.
|
18
|
+
[John Fairhurst](https://github.com/johnfairh)
|
19
|
+
|
20
|
+
##### Bug Fixes
|
21
|
+
|
22
|
+
* Render bullet lists correctly when followed by a callout.
|
23
|
+
[John Fairhurst](https://github.com/johnfairh)
|
24
|
+
[#785](https://github.com/realm/jazzy/issues/785)
|
25
|
+
|
26
|
+
* Render markup of text inside double quotes.
|
27
|
+
[John Fairhurst](https://github.com/johnfairh)
|
28
|
+
[#992](https://github.com/realm/jazzy/issues/992)
|
29
|
+
|
30
|
+
* Fix `sourcekitten_sourcefile` used from config file.
|
31
|
+
[John Fairhurst](https://github.com/johnfairh)
|
32
|
+
[#1137](https://github.com/realm/jazzy/issues/1137)
|
33
|
+
|
34
|
+
## 0.12.0
|
35
|
+
|
36
|
+
##### Breaking
|
37
|
+
|
38
|
+
* None.
|
39
|
+
|
40
|
+
##### Enhancements
|
41
|
+
|
42
|
+
* Support for mixed Swift-ObjC modules: generate two sets of SourceKitten
|
43
|
+
json and pass them on using `--sourcekitten-sourcefile`.
|
44
|
+
[Joe Susnick](https://github.com/joesus)
|
45
|
+
[John Fairhurst](https://github.com/johnfairh)
|
46
|
+
[#447](https://github.com/realm/jazzy/issues/447)
|
47
|
+
|
48
|
+
##### Bug Fixes
|
49
|
+
|
50
|
+
* Stop displaying type attributes on extension declarations.
|
51
|
+
[John Fairhurst](https://github.com/johnfairh)
|
52
|
+
|
53
|
+
* Show ObjC and Swift classes (etc.) in the same category.
|
54
|
+
[John Fairhurst](https://github.com/johnfairh)
|
55
|
+
|
56
|
+
* Merge Swift extensions into ObjC classes.
|
57
|
+
[John Fairhurst](https://github.com/johnfairh)
|
58
|
+
[Joe Susnick](https://github.com/joesus)
|
59
|
+
|
60
|
+
## 0.11.2
|
61
|
+
|
62
|
+
##### Breaking
|
63
|
+
|
64
|
+
* None.
|
65
|
+
|
66
|
+
##### Enhancements
|
67
|
+
|
68
|
+
* None.
|
69
|
+
|
70
|
+
##### Bug Fixes
|
71
|
+
|
72
|
+
* Generate Swift docs with Xcode 11 and paths with spaces.
|
73
|
+
[John Fairhurst](https://github.com/johnfairh)
|
74
|
+
[#1108](https://github.com/realm/jazzy/issues/1108)
|
75
|
+
|
76
|
+
* Reinstate guessing of module name from podspec, broken in 0.11.0.
|
77
|
+
[John Fairhurst](https://github.com/johnfairh)
|
78
|
+
[#1109](https://github.com/realm/jazzy/issues/1109)
|
79
|
+
|
80
|
+
## 0.11.1
|
81
|
+
|
82
|
+
##### Breaking
|
83
|
+
|
84
|
+
* None.
|
85
|
+
|
86
|
+
##### Enhancements
|
87
|
+
|
88
|
+
* None.
|
89
|
+
|
90
|
+
##### Bug Fixes
|
91
|
+
|
92
|
+
* Don't use SwiftPM if there is an Xcode workspace or project in a non-root
|
93
|
+
directory.
|
94
|
+
[John Fairhurst](https://github.com/johnfairh)
|
95
|
+
[#1103](https://github.com/realm/jazzy/issues/1103)
|
96
|
+
|
97
|
+
## 0.11.0
|
98
|
+
|
99
|
+
##### Breaking
|
100
|
+
|
101
|
+
* None.
|
102
|
+
|
103
|
+
##### Enhancements
|
104
|
+
|
105
|
+
* Sass support now provided by `libsass` via `sassc` instead of the
|
106
|
+
deprecated Ruby Sass gem.
|
107
|
+
[John Fairhurst](https://github.com/johnfairh)
|
108
|
+
|
109
|
+
* Update bundled jQuery to 3.4.1 (all themes).
|
110
|
+
[Paul Idstein](https://github.com/idstein)
|
111
|
+
|
112
|
+
* Support Xcode 11 Swift projects that pass a response file to the Swift
|
113
|
+
compiler.
|
114
|
+
[John Fairhurst](https://github.com/johnfairh)
|
115
|
+
[#1087](https://github.com/realm/jazzy/issues/1087)
|
116
|
+
|
117
|
+
* Generate Swift docs from a Swift Package Manager package without
|
118
|
+
requiring an Xcode project file. Add `--swift-build-tool` to choose
|
119
|
+
the build method if both `.xcodeproj` and `Package.swift` files are
|
120
|
+
present. Add `--build-tool-flags` as a preferred alias for
|
121
|
+
`--xcodebuild-flags`.
|
122
|
+
[John Fairhurst](https://github.com/johnfairh)
|
123
|
+
[#487](https://github.com/realm/jazzy/issues/487)
|
124
|
+
|
125
|
+
##### Bug Fixes
|
126
|
+
|
127
|
+
* Preserve non-latin characters in guide filenames and heading IDs.
|
128
|
+
[John Fairhurst](https://github.com/johnfairh)
|
129
|
+
[#1091](https://github.com/realm/jazzy/issues/1091)
|
130
|
+
|
131
|
+
* Generate correct html for custom categories containing special
|
132
|
+
characters.
|
133
|
+
[John Fairhurst](https://github.com/johnfairh)
|
134
|
+
[#945](https://github.com/realm/jazzy/issues/945)
|
135
|
+
|
136
|
+
* Fix crash on files with misplaced documentation comments.
|
137
|
+
[John Fairhurst](https://github.com/johnfairh)
|
138
|
+
[#1083](https://github.com/realm/jazzy/issues/1083)
|
139
|
+
|
1
140
|
## 0.10.0
|
2
141
|
|
3
142
|
##### Breaking
|
data/CONTRIBUTING.md
CHANGED
@@ -49,7 +49,7 @@ git push
|
|
49
49
|
You'll need push access to the integration specs repo to do this. You can
|
50
50
|
request access from one of the maintainers when filing your PR.
|
51
51
|
|
52
|
-
You must have Xcode
|
52
|
+
You must have Xcode 11.2 installed to build the integration specs.
|
53
53
|
|
54
54
|
## Making changes to SourceKitten
|
55
55
|
|
data/Gemfile.lock
CHANGED
@@ -1,31 +1,34 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jazzy (0.
|
4
|
+
jazzy (0.13.0)
|
5
5
|
cocoapods (~> 1.5)
|
6
6
|
mustache (~> 1.1)
|
7
7
|
open4
|
8
8
|
redcarpet (~> 3.4)
|
9
9
|
rouge (>= 2.0.6, < 4.0)
|
10
|
-
|
10
|
+
sassc (~> 2.1)
|
11
11
|
sqlite3 (~> 1.3)
|
12
12
|
xcinvoke (~> 0.3.0)
|
13
13
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
CFPropertyList (3.0.
|
17
|
+
CFPropertyList (3.0.2)
|
18
18
|
activesupport (4.2.11.1)
|
19
19
|
i18n (~> 0.7)
|
20
20
|
minitest (~> 5.1)
|
21
21
|
thread_safe (~> 0.3, >= 0.3.4)
|
22
22
|
tzinfo (~> 1.1)
|
23
|
-
addressable (2.
|
24
|
-
public_suffix (>= 2.0.2, <
|
23
|
+
addressable (2.7.0)
|
24
|
+
public_suffix (>= 2.0.2, < 5.0)
|
25
|
+
algoliasearch (1.27.1)
|
26
|
+
httpclient (~> 2.8, >= 2.8.3)
|
27
|
+
json (>= 1.5.1)
|
25
28
|
ast (2.4.0)
|
26
29
|
atomos (0.1.3)
|
27
30
|
bacon (1.2.0)
|
28
|
-
claide (1.0.
|
31
|
+
claide (1.0.3)
|
29
32
|
claide-plugins (0.9.2)
|
30
33
|
cork
|
31
34
|
nap
|
@@ -33,16 +36,16 @@ GEM
|
|
33
36
|
clintegracon (0.7.0)
|
34
37
|
colored (~> 1.2)
|
35
38
|
diffy
|
36
|
-
cocoapods (1.
|
39
|
+
cocoapods (1.8.4)
|
37
40
|
activesupport (>= 4.0.2, < 5)
|
38
41
|
claide (>= 1.0.2, < 2.0)
|
39
|
-
cocoapods-core (= 1.
|
42
|
+
cocoapods-core (= 1.8.4)
|
40
43
|
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
41
44
|
cocoapods-downloader (>= 1.2.2, < 2.0)
|
42
45
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
43
46
|
cocoapods-search (>= 1.0.0, < 2.0)
|
44
47
|
cocoapods-stats (>= 1.0.0, < 2.0)
|
45
|
-
cocoapods-trunk (>= 1.
|
48
|
+
cocoapods-trunk (>= 1.4.0, < 2.0)
|
46
49
|
cocoapods-try (>= 1.1.0, < 2.0)
|
47
50
|
colored2 (~> 3.1)
|
48
51
|
escape (~> 0.0.4)
|
@@ -51,18 +54,20 @@ GEM
|
|
51
54
|
molinillo (~> 0.6.6)
|
52
55
|
nap (~> 1.0)
|
53
56
|
ruby-macho (~> 1.4)
|
54
|
-
xcodeproj (>= 1.
|
55
|
-
cocoapods-core (1.
|
57
|
+
xcodeproj (>= 1.11.1, < 2.0)
|
58
|
+
cocoapods-core (1.8.4)
|
56
59
|
activesupport (>= 4.0.2, < 6)
|
60
|
+
algoliasearch (~> 1.0)
|
61
|
+
concurrent-ruby (~> 1.1)
|
57
62
|
fuzzy_match (~> 2.0.4)
|
58
63
|
nap (~> 1.0)
|
59
64
|
cocoapods-deintegrate (1.0.4)
|
60
|
-
cocoapods-downloader (1.
|
65
|
+
cocoapods-downloader (1.3.0)
|
61
66
|
cocoapods-plugins (1.0.0)
|
62
67
|
nap
|
63
68
|
cocoapods-search (1.0.0)
|
64
69
|
cocoapods-stats (1.1.0)
|
65
|
-
cocoapods-trunk (1.
|
70
|
+
cocoapods-trunk (1.4.1)
|
66
71
|
nap (>= 0.8, < 2.0)
|
67
72
|
netrc (~> 0.11)
|
68
73
|
cocoapods-try (1.1.0)
|
@@ -73,7 +78,7 @@ GEM
|
|
73
78
|
colored2 (~> 3.1)
|
74
79
|
crack (0.4.3)
|
75
80
|
safe_yaml (~> 1.0.0)
|
76
|
-
danger (6.0
|
81
|
+
danger (6.1.0)
|
77
82
|
claide (~> 1.0)
|
78
83
|
claide-plugins (>= 0.9.2)
|
79
84
|
colored2 (~> 3.1)
|
@@ -88,31 +93,31 @@ GEM
|
|
88
93
|
terminal-table (~> 1)
|
89
94
|
diffy (3.3.0)
|
90
95
|
escape (0.0.4)
|
91
|
-
faraday (0.
|
96
|
+
faraday (0.17.1)
|
92
97
|
multipart-post (>= 1.2, < 3)
|
93
98
|
faraday-http-cache (2.0.0)
|
94
99
|
faraday (~> 0.8)
|
95
|
-
ffi (1.11.
|
100
|
+
ffi (1.11.3)
|
96
101
|
fourflusher (2.3.1)
|
97
102
|
fuzzy_match (2.0.4)
|
98
103
|
gh_inspector (1.1.3)
|
99
104
|
git (1.5.0)
|
100
|
-
hashdiff (0.
|
105
|
+
hashdiff (1.0.0)
|
106
|
+
httpclient (2.8.3)
|
101
107
|
i18n (0.9.5)
|
102
108
|
concurrent-ruby (~> 1.0)
|
109
|
+
json (2.2.0)
|
103
110
|
kramdown (2.1.0)
|
104
111
|
kramdown-parser-gfm (1.1.0)
|
105
112
|
kramdown (~> 2.0)
|
106
113
|
liferaft (0.0.6)
|
107
|
-
|
108
|
-
|
109
|
-
mocha (1.9.0)
|
110
|
-
metaclass (~> 0.0.1)
|
114
|
+
minitest (5.13.0)
|
115
|
+
mocha (1.10.1)
|
111
116
|
mocha-on-bacon (0.2.3)
|
112
117
|
mocha (>= 0.13.0)
|
113
118
|
molinillo (0.6.6)
|
114
119
|
multipart-post (2.1.1)
|
115
|
-
mustache (1.1.
|
120
|
+
mustache (1.1.1)
|
116
121
|
nanaimo (0.2.6)
|
117
122
|
nap (1.1.0)
|
118
123
|
netrc (0.11.0)
|
@@ -120,21 +125,18 @@ GEM
|
|
120
125
|
octokit (4.14.0)
|
121
126
|
sawyer (~> 0.8.0, >= 0.5.3)
|
122
127
|
open4 (1.3.4)
|
123
|
-
parallel (1.
|
124
|
-
parser (2.6.
|
128
|
+
parallel (1.19.1)
|
129
|
+
parser (2.6.5.0)
|
125
130
|
ast (~> 2.4.0)
|
126
131
|
powerpack (0.1.2)
|
127
132
|
prettybacon (0.0.2)
|
128
133
|
bacon (~> 1.2)
|
129
|
-
public_suffix (
|
134
|
+
public_suffix (4.0.1)
|
130
135
|
rainbow (2.2.2)
|
131
136
|
rake
|
132
137
|
rake (10.5.0)
|
133
|
-
|
134
|
-
|
135
|
-
ffi (~> 1.0)
|
136
|
-
redcarpet (3.4.0)
|
137
|
-
rouge (3.4.1)
|
138
|
+
redcarpet (3.5.0)
|
139
|
+
rouge (3.13.0)
|
138
140
|
rubocop (0.49.0)
|
139
141
|
parallel (~> 1.10)
|
140
142
|
parser (>= 2.3.3.1, < 3.0)
|
@@ -145,11 +147,8 @@ GEM
|
|
145
147
|
ruby-macho (1.4.0)
|
146
148
|
ruby-progressbar (1.10.1)
|
147
149
|
safe_yaml (1.0.5)
|
148
|
-
|
149
|
-
|
150
|
-
sass-listen (4.0.0)
|
151
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
152
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
150
|
+
sassc (2.2.1)
|
151
|
+
ffi (~> 1.9)
|
153
152
|
sawyer (0.8.2)
|
154
153
|
addressable (>= 2.3.5)
|
155
154
|
faraday (> 0.8, < 2.0)
|
@@ -160,13 +159,13 @@ GEM
|
|
160
159
|
tzinfo (1.2.5)
|
161
160
|
thread_safe (~> 0.1)
|
162
161
|
unicode-display_width (1.6.0)
|
163
|
-
webmock (3.6
|
162
|
+
webmock (3.7.6)
|
164
163
|
addressable (>= 2.3.6)
|
165
164
|
crack (>= 0.3.2)
|
166
165
|
hashdiff (>= 0.4.0, < 2.0.0)
|
167
166
|
xcinvoke (0.3.0)
|
168
167
|
liferaft (~> 0.0.6)
|
169
|
-
xcodeproj (1.
|
168
|
+
xcodeproj (1.13.0)
|
170
169
|
CFPropertyList (>= 2.3.3, < 4.0)
|
171
170
|
atomos (~> 0.1.3)
|
172
171
|
claide (>= 1.0.2, < 2.0)
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
Both Swift and Objective-C projects are supported.
|
10
10
|
|
11
|
-
*
|
11
|
+
*SwiftPM support was recently added, so please report any issues you find.*
|
12
12
|
|
13
13
|
Instead of parsing your source files, `jazzy` hooks into [Clang][clang] and
|
14
14
|
[SourceKit][sourcekit] to use the [AST][ast] representation of your code and
|
@@ -23,9 +23,11 @@ unacceptable behavior to [info@realm.io](mailto:info@realm.io).
|
|
23
23
|
|
24
24
|
## Requirements
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
You need development tools to build the project you wish to document. Jazzy supports
|
27
|
+
both [Xcode][xcode] and [Swift Package Manager][spm] projects.
|
28
|
+
|
29
|
+
Jazzy expects to be running on __macOS__. See [below](#linux) for tips to run Jazzy
|
30
|
+
on Linux.
|
29
31
|
|
30
32
|
## Installation
|
31
33
|
|
@@ -41,8 +43,9 @@ common problems.
|
|
41
43
|
Run `jazzy` from your command line. Run `jazzy -h` for a list of additional options.
|
42
44
|
|
43
45
|
If your Swift module is the first thing to build, and it builds fine when running
|
44
|
-
`xcodebuild` without any arguments from the root of your project, then
|
45
|
-
`jazzy` (without any arguments) from the root of your project should
|
46
|
+
`xcodebuild` or `swift build` without any arguments from the root of your project, then
|
47
|
+
just running `jazzy` (without any arguments) from the root of your project should
|
48
|
+
succeed too!
|
46
49
|
|
47
50
|
You can set options for your project’s documentation in a configuration file,
|
48
51
|
`.jazzy.yaml` by default. For a detailed explanation and an exhaustive list of
|
@@ -83,13 +86,22 @@ jazzy \
|
|
83
86
|
--github_url https://github.com/realm/realm-cocoa \
|
84
87
|
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
|
85
88
|
--module-version 0.96.2 \
|
86
|
-
--
|
89
|
+
--build-tool-arguments -scheme,RealmSwift \
|
87
90
|
--module RealmSwift \
|
88
91
|
--root-url https://realm.io/docs/swift/0.96.2/api/ \
|
89
92
|
--output docs/swift_output \
|
90
93
|
--theme docs/themes
|
91
94
|
```
|
92
95
|
|
96
|
+
This is how docs are generated for a project that uses the Swift Package Manager:
|
97
|
+
|
98
|
+
```shell
|
99
|
+
jazzy \
|
100
|
+
--module DeckOfPlayingCards \
|
101
|
+
--swift-build-tool spm \
|
102
|
+
--build-tool-arguments -Xswiftc,-swift-version,-Xswiftc,5
|
103
|
+
```
|
104
|
+
|
93
105
|
### Objective-C
|
94
106
|
|
95
107
|
To generate documentation for Objective-C headers, you must pass the following
|
@@ -116,7 +128,7 @@ jazzy \
|
|
116
128
|
--github_url https://github.com/realm/realm-cocoa \
|
117
129
|
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v2.2.0 \
|
118
130
|
--module-version 2.2.0 \
|
119
|
-
--
|
131
|
+
--build-tool-arguments --objc,Realm/Realm.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd) \
|
120
132
|
--module Realm \
|
121
133
|
--root-url https://realm.io/docs/objc/2.2.0/api/ \
|
122
134
|
--output docs/objc_output \
|
@@ -138,6 +150,33 @@ jazzy \
|
|
138
150
|
--module AFNetworking
|
139
151
|
```
|
140
152
|
|
153
|
+
### Mixed Objective-C / Swift
|
154
|
+
|
155
|
+
*This feature is new and has some rough edges.*
|
156
|
+
|
157
|
+
To generate documentation for a mixed Swift and Objective-C project you must first
|
158
|
+
generate two [SourceKitten][sourcekitten] files: one for Swift and one for Objective-C.
|
159
|
+
|
160
|
+
Then pass these files to Jazzy together using `--sourcekitten-sourcefile`.
|
161
|
+
|
162
|
+
#### Example
|
163
|
+
|
164
|
+
This is how docs are generated from an Xcode project for a module containing both
|
165
|
+
Swift and Objective-C files:
|
166
|
+
|
167
|
+
```shell
|
168
|
+
# Generate Swift SourceKitten output
|
169
|
+
sourcekitten doc -- -workspace MyProject.xcworkspace -scheme MyScheme > swiftDoc.json
|
170
|
+
|
171
|
+
# Generate Objective-C SourceKitten output
|
172
|
+
sourcekitten doc --objc $(pwd)/MyProject/MyProject.h \
|
173
|
+
-- -x objective-c -isysroot $(xcrun --show-sdk-path --sdk iphonesimulator) \
|
174
|
+
-I $(pwd) -fmodules > objcDoc.json
|
175
|
+
|
176
|
+
# Feed both outputs to Jazzy as a comma-separated list
|
177
|
+
jazzy --sourcekitten-sourcefile swiftDoc.json,objcDoc.json
|
178
|
+
```
|
179
|
+
|
141
180
|
### Themes
|
142
181
|
|
143
182
|
Three themes are provided with jazzy: `apple` (default), `fullwidth` and `jony`.
|
@@ -233,6 +272,24 @@ For example to use Xcode 9.4:
|
|
233
272
|
jazzy --swift-version 4.1.2
|
234
273
|
```
|
235
274
|
|
275
|
+
## Linux
|
276
|
+
|
277
|
+
Jazzy uses [SourceKitten][sourcekitten] to communicate with the Swift build
|
278
|
+
environment and compiler. The `sourcekitten` binary included in the Jazzy gem
|
279
|
+
is built for macOS and so does not run on other operating systems.
|
280
|
+
|
281
|
+
To use Jazzy on Linux you first need to install and build `sourcekitten`
|
282
|
+
following instructions from [SourceKitten's GitHub repository][sourcekitten].
|
283
|
+
|
284
|
+
Then to generate documentation for a SwiftPM project, instead of running just
|
285
|
+
`jazzy` do:
|
286
|
+
```shell
|
287
|
+
sourcekitten doc --spm > doc.json
|
288
|
+
jazzy --sourcekitten-sourcefile doc.json
|
289
|
+
```
|
290
|
+
|
291
|
+
We hope to improve this process in the future.
|
292
|
+
|
236
293
|
## Troubleshooting
|
237
294
|
|
238
295
|
### Swift
|
@@ -301,7 +358,7 @@ Instructions to build SourceKitten from source can be found at
|
|
301
358
|
- Leverage modern HTML templating ([Mustache][mustache])
|
302
359
|
- Leverage the power and accuracy of the [Clang AST][ast] and [SourceKit][sourcekit]
|
303
360
|
- Support for Dash docsets
|
304
|
-
- Support Swift and Objective-C
|
361
|
+
- Support Swift and Objective-C
|
305
362
|
|
306
363
|
## License
|
307
364
|
|
@@ -326,3 +383,4 @@ read [our blog](https://realm.io/news) or say hi on twitter
|
|
326
383
|
[SourceKitten]: https://github.com/jpsim/SourceKitten "SourceKitten"
|
327
384
|
[bundler]: https://rubygems.org/gems/bundler
|
328
385
|
[mustache]: https://mustache.github.io "Mustache"
|
386
|
+
[spm]: https://swift.org/package-manager/ "Swift Package Manager"
|