Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: jsdoc annotations and generation #177

Merged
merged 1 commit into from
Oct 3, 2023
Merged

feature: jsdoc annotations and generation #177

merged 1 commit into from
Oct 3, 2023

Conversation

4141done
Copy link
Collaborator

@4141done 4141done commented Oct 2, 2023

What

Adds the ability to generate a website with reference documentation based on JSDoc annotations in the Javascript code. Annotations are also added. This will help you if you use an editor that knows how to parse JSDoc annotations.

This change adds a workflow that depends on NodeJS however, normal usage of the gateway will not require NodeJs, nor will any development workflows. In the future, development workflows will require NodeJs. Discussion on this topic here: #163

Usage

To generate the documentation run:

make jsdoc

It will be located in the ./reference folder at the root of the project

To generate and view the documentation in a browser, run:

make jsdoc-open

To remove generated documentation, run:

make clean

@@ -1,7 +1,58 @@
# Created by https://www.toptal.com/developers/gitignore/api/intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,node,vim,emacs,macos
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotation:
gitignore changes are primarily to take care of the new nodejs depenedency for docs builds.

@@ -53,6 +107,12 @@ cmake-build-*/
# IntelliJ
out/

# jsdoc build directory
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotation:
This is added to ignore the built documentation.


docs_destination_directory = "reference"

.PHONY: docs
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotation:
This may not be the correct thing to do, but without it I could not get the make jsdoc make clean make jsdoc flow to work correctly.

I figure it's safer to build the docs every time anyway. In a CI context this shouldn't matter.

@4141done 4141done changed the title [WIP] feature: jsdoc annotations and generation feature: jsdoc annotations and generation Oct 2, 2023
@4141done 4141done marked this pull request as ready for review October 2, 2023 21:51
@4141done 4141done requested a review from dekobon October 2, 2023 21:52
Copy link
Collaborator

@dekobon dekobon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great.

@4141done 4141done changed the base branch from je-issue-171 to master October 3, 2023 17:21
@4141done 4141done merged commit 2134898 into master Oct 3, 2023
2 checks passed
elJosho pushed a commit to elJosho/nginx-s3-gateway that referenced this pull request Oct 25, 2023
# What
Adds the ability to generate a website with reference documentation based on JSDoc annotations in the Javascript code. Annotations are also added.  This will help you if you use an editor that knows how to parse JSDoc annotations.

**This change adds a workflow that depends on NodeJS** however, normal usage of the gateway will not require NodeJs, nor will any development workflows.  In the future, development workflows will require NodeJs.  Discussion on this topic here: nginxinc#163

## Usage
To generate the documentation run:
```
make jsdoc
```
It will be located in the `./reference` folder at the root of the project

To generate and view the documentation in a browser, run:
```
make jsdoc-open
```

To remove generated documentation, run:
```
make clean
```
@4141done 4141done deleted the je-js-doc branch April 25, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants