Skip to content

Commit 9e31770

Browse files
committed
Merge pull request 'fix/js-doc' (#92) from fix/js-doc into hotfix/v9.0.3
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/build_tools/pulls/92
2 parents fece05d + 4d6b9f9 commit 9e31770

30 files changed

+784
-1343
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ necessary for the compilation process, all the dependencies required for the
88
correct work, as well as to get the latest version of
99
**ONLYOFFICE products** source code and build all their components.
1010

11-
**Important!** We can only guarantee the correct work of the products built from
12-
the `master` branch.
11+
**Important!** We can only guarantee the correct work of the products built
12+
from the `master` branch.
1313

1414
## How to use - Linux
1515

develop/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ but don't want to compile pretty compilcated core product to make those changes.
77
## System requirements
88

99
**Note**: ARM-based architectures are currently **NOT** supported;
10-
attempting to run the images on ARM devices may result in startup failures or other runtime issues.
10+
attempting to run the images on ARM devices may result in startup failures
11+
or other runtime issues.
1112

1213
### Windows
1314

scripts/sdkjs_common/jsdoc/README.md

Lines changed: 76 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
21
# Documentation Generation Guide
32

4-
This guide explains how to generate documentation for Onlyoffice Builder/Plugins API using the provided Python scripts: `generate_docs_json.py`, `generate_docs_plugins_json.py`, `generate_docs_md.py`. These scripts are used to create JSON and Markdown documentation for the `apiBuilder.js` files from the word, cell, and slide editors.
3+
This guide explains how to generate documentation for Onlyoffice Builder
4+
and Plugins (Methods/Events) API using the following Python scripts:
5+
6+
- `office-api/generate_docs_json.py`
7+
- `office-api/generate_docs_md.py`
8+
- `plugins/generate_docs_methods_json.py`
9+
- `plugins/generate_docs_methods_md.py`
10+
- `plugins/generate_docs_events_json.py`
11+
- `plugins/generate_docs_events_md.py`
512

613
## Requirements
714

@@ -20,61 +27,112 @@ npm install
2027

2128
## Scripts Overview
2229

23-
### `generate_docs_json.py`
30+
### `office-api/generate_docs_json.py`
2431

2532
This script generates JSON documentation based on the `apiBuilder.js` files.
2633

2734
- **Usage**:
35+
2836
```bash
2937
python generate_docs_json.py output_path
3038
```
3139

3240
- **Parameters**:
33-
- `output_path` (optional): The directory where the JSON documentation will be saved. If not specified, the default path is `../../../../office-js-api-declarations/office-js-api`.
41+
- `output_path` (optional): The directory where the JSON documentation
42+
will be saved. If not specified, the default path is
43+
`../../../../office-js-api-declarations/office-js-api`.
44+
45+
### `office-api/generate_docs_md.py`
46+
47+
This script generates Markdown documentation from the `apiBuilder.js` files.
48+
49+
- **Usage**:
50+
51+
```bash
52+
python generate_docs_md.py output_path
53+
```
54+
55+
- **Parameters**:
56+
- `output_path` (optional): The directory where the Markdown documentation
57+
will be saved. If not specified, the default path is
58+
`../../../../office-js-api/`.
3459

35-
### `generate_docs_plugins_json.py`
60+
### `plugins/generate_docs_methods_json.py`
3661

3762
This script generates JSON documentation based on the `api_plugins.js` files.
3863

3964
- **Usage**:
65+
4066
```bash
41-
python generate_docs_plugins_json.py output_path
67+
python generate_docs_methods_json.py output_path
4268
```
4369

4470
- **Parameters**:
45-
- `output_path` (optional): The directory where the JSON documentation will be saved. If not specified, the default path is `../../../../office-js-api-declarations/office-js-api-plugins`.
71+
- `output_path` (optional): The directory where the JSON documentation
72+
will be saved. If not specified, the default path is
73+
`../../../../office-js-api-declarations/office-js-api-plugins`.
4674

47-
### `generate_docs_md.py`
75+
### `plugins/generate_docs_events_json.py`
4876

49-
This script generates Markdown documentation from the `apiBuilder.js` files.
77+
This script generates JSON documentation based on the `plugin-events.js` files.
5078

5179
- **Usage**:
80+
5281
```bash
53-
python generate_docs_md.py output_path
82+
python generate_docs_events_json.py output_path
5483
```
5584

5685
- **Parameters**:
57-
- `output_path` (optional): The directory where the Markdown documentation will be saved. If not specified, the default path is `../../../../office-js-api/`.
86+
- `output_path` (optional): The directory where the JSON documentation
87+
will be saved. If not specified, the default path is
88+
`../../../../office-js-api-declarations/office-js-api-plugins`.
89+
90+
### `plugins/generate_docs_methods_md.py`
91+
92+
This script generates Markdown documentation from the `api_plugins.js` files.
93+
94+
- **Usage**:
95+
96+
```bash
97+
python generate_docs_methods_md.py output_path
98+
```
99+
100+
- **Parameters**:
101+
- `output_path` (optional): The directory where the Markdown documentation
102+
will be saved. If not specified, the default path is
103+
`../../../../office-js-api/`.
104+
105+
### `plugins/generate_docs_events_md.py`
106+
107+
This script generates Markdown documentation from the `plugin-events.js` files.
108+
109+
- **Usage**:
110+
111+
```bash
112+
python generate_docs_events_md.py output_path
113+
```
114+
115+
- **Parameters**:
116+
- `output_path` (optional): The directory where the Markdown documentation
117+
will be saved. If not specified, the default path is
118+
`../../../../office-js-api/`.
58119

59120
## Example
60121

61122
To generate JSON documentation with the default output path:
62-
```bash
63-
python generate_docs_json.py /path/to/save/json
64-
```
65123

66-
To generate JSON documentation with the default output path:
67124
```bash
68-
python generate_docs_plugins_json.py /path/to/save/json
125+
python generate_docs_json.py /path/to/save/json
69126
```
70127

71128
To generate Markdown documentation and specify a custom output path:
129+
72130
```bash
73131
python generate_docs_md.py /path/to/save/markdown
74132
```
75133

76134
## Notes
77135

78-
- Make sure to have all necessary permissions to run these scripts and write to the specified directories.
136+
- Make sure to have all necessary permissions to run these scripts and write
137+
to the specified directories.
79138
- The output directories will be created if they do not exist.
80-

scripts/sdkjs_common/jsdoc/config/builder/slide.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)