You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-25Lines changed: 65 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,88 @@
1
1
# PlayCanvas API Reference
2
2
3
-
This repository builds the [PlayCanvas API Reference](https://api.playcanvas.com/). It is built using [TypeDoc](https://typedoc.org/).
3
+
This repository builds the combined PlayCanvas API Reference. The API reference is a collection of documentation from multiple PlayCanvas repositories.
4
4
5
-
## Installation
5
+
## Requirements
6
6
7
7
Ensure you have Node.js 18+ installed.
8
8
9
-
After cloning the repo, initialize the submodules:
9
+
## Configuration
10
10
11
-
git submodule init
12
-
git submodule update --remote
11
+
Repository configuration is stored in `repos-config.json`. This file defines the repositories to be cloned, their URLs, and default branches:
You can modify this file to change default branches, add new repositories, or remove existing ones.
17
27
18
-
## Building
28
+
## Building the API Reference
19
29
20
-
To build the API reference manual locally, run:
30
+
To build the combined API reference, run:
21
31
22
-
npm run build
32
+
```bash
33
+
npm run build
34
+
```
23
35
24
-
The manual will be output to the `docs` folder.
36
+
This cross-platform script will:
25
37
26
-
## Viewing
38
+
1. Load the repository configuration from `repos-config.json`
39
+
2. Clone the configured PlayCanvas repositories
40
+
3. Install dependencies for each repository
41
+
4. Build the TypeDoc documentation for each repository
42
+
5. Copy the documentation to a central `docs` folder
43
+
6. Create a main index.html file that allows navigation between the different API references
27
44
28
-
To view the build manual, run:
45
+
> [!NOTE]
46
+
> The build script automatically cleans and recreates the `repos` directory each time it's run, ensuring you always get a fresh build with the latest code from the configured branches.
29
47
30
-
npm run serve
48
+
### Specifying Repository Branches
31
49
32
-
Then point your browser at `http://localhost:3000`.
50
+
The default branches for all repositories are defined in the `repos-config.json` file. This is the recommended place to set your branch configurations:
0 commit comments