Skip to content

Commit

Permalink
feat: automatically generate docs (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator authored Jan 12, 2023
1 parent 4f42ca5 commit e7ada8b
Show file tree
Hide file tree
Showing 9 changed files with 1,980 additions and 776 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ For more information on how to use `create-glee-app`, you can review [the `creat
* :gear: [Configuring your application](docs/config-file.md): tweak Glee's default configuration.
* :rocket: [Examples](./examples): see Glee in action.

## Generating documentation

When using spec-driven framework like Glee, it's always neccessary to have docs and code always in sync.
Glee will automatically generate documentation for your application and you can also generate your documentation yourself by running:

```bash
glee docs
```

You can also tweak Glee's default configuration for generating documentation here [Configuring your application](docs/config-file.md)
## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down
13 changes: 13 additions & 0 deletions docs/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ Here is an example of a `glee.config.js` file for reference:
```js
export default async function () {
return {
docs: {
enabled: true, // Enable/Disable documentation generation
folder: 'docs', // Folder where you want the output of your docs to reside.
template: '@asyncapi/markdown-template' // Type of template you want to use.
}
websocket: {
server: {
httpServer: customServer, // A custom HTTP server of your own.
Expand Down Expand Up @@ -66,6 +71,14 @@ export default async function () {

Every protocol has different configuration needs so each protocol has unique configurations:

### Generating Documentation

|Field|Description|
|--|--|
|docs.enabled|This flag enables/disables the docs generation functionality.
|docs.folder|The dedicated folder you want your generated docs to reside.
|docs.template|The AsyncAPI template you wanna use for generating your documentation.

### Websocket Server

|Field|Description|
Expand Down
Loading

0 comments on commit e7ada8b

Please sign in to comment.