Skip to content

Commit d32040a

Browse files
make instructions easier to read and use, add instructions for running from source
1 parent d278fb0 commit d32040a

1 file changed

Lines changed: 42 additions & 3 deletions

File tree

docs/source/api-reference.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,59 @@ To run the document generator, make sure you have [SourceDocs](https://github.co
1717
brew install sourcedocs
1818
```
1919

20+
>**NOTE**: We are currently depending on functionality added in [this PR](https://github.com/eneko/SourceDocs/pull/20), so if that's not merged, and pushed as a new version to Homebrew, you'll need to check out from source.
21+
22+
## Homebrew Instructions
23+
2024
To generate docs for the main `Apollo` project, `cd` into the source root and run:
2125

2226
```
23-
sourcedocs generate --output-folder "docs/source/api/Apollo" -- -scheme Apollo -workspace Apollo.xcworkspace
27+
sourcedocs generate \
28+
--output-folder "docs/source/api/Apollo" \
29+
--link-ending "/" \
30+
-- \
31+
-scheme Apollo \
32+
-workspace Apollo.xcworkspace
2433
```
2534

2635
To generate docs for the `ApolloSQLite` project, `cd` into the source root and run:
2736

2837
```
29-
sourcedocs generate --output-folder "docs/source/api/ApolloSQLite" -- -scheme ApolloSQLite -workspace Apollo.xcworkspace
38+
sourcedocs generate \
39+
--output-folder "docs/source/api/ApolloSQLite" \
40+
--link-ending "/" \
41+
-- \
42+
-scheme ApolloSQLite \
43+
-workspace Apollo.xcworkspace
3044
```
3145

3246
To generate for docs the `ApolloWebSocket` project, `cd` into the source root and run:
3347

3448
```
35-
sourcedocs generate --output-folder "docs/source/api/ApolloWebSocket" -- -scheme ApolloWebSocket -workspace Apollo.xcworkspace
49+
sourcedocs generate \
50+
--output-folder "docs/source/api/ApolloWebSocket" \
51+
--link-ending "/" \
52+
-- \
53+
-scheme ApolloWebSocket \
54+
-workspace Apollo.xcworkspace
3655
```
56+
57+
## From Source Instructions
58+
59+
Commands are essentially the same except for the following differences:
60+
61+
- All commands should start with `swift run sourcedocs` instead of just `sourcedocs`
62+
- Add an `--input-folder` parameter with the full path to the Apollo `SRCROOT` as its value
63+
- Make the value of `--output-folder`'s parameter use a full path rather than a relative one.
64+
65+
For example, this will run the generator for `ApolloWebSocket`:
66+
67+
```
68+
swift run sourcedocs generate \
69+
--input-folder "/Users/[you]/apollo-ios" \
70+
--output-folder "/Users/[you]/apollo-ios/docs/source/api/ApolloWebSocket" \
71+
--link-ending "/" \
72+
-- \
73+
-scheme "ApolloWebSocket" \
74+
-workspace "Apollo.xcworkspace"
75+
```

0 commit comments

Comments
 (0)