Skip to content

Commit ba94ea2

Browse files
committed
[jsdoc] Refactoring
1 parent de1d437 commit ba94ea2

28 files changed

+780
-1340
lines changed

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 and
4+
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 will be
42+
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 will
57+
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 will be
72+
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 will be
87+
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 will
102+
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 will
117+
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 to
137+
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)