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

add: jsdoc-api & vitepress for documentation generation #3032

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ typings/

# local version cache
.wwebjs_cache/

# vitepress local cache
.vitepress/cache/
46 changes: 23 additions & 23 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc"]
},
"source": {
"include": ["src", "package.json", "README.md"],
"includePattern": ".js$",
"excludePattern": "(node_modules/|docs)"
},
"plugins": [
"plugins/markdown"
"source": {
"includeFiles": [
"src",
"README.md"
],
"templates": {
"cleverLinks": false,
"monospaceLinks": true,
"useLongnameInNav": false,
"showInheritedInNav": true
},
"opts": {
"destination": "./docs/",
"encoding": "utf8",
"recurse": true,
"template": "./node_modules/jsdoc-baseline"
}
"excludeFiles": [
"index.js"
],
"includePattern": ".js$"
},
"versions": {
"generateMainBranch": true,
"startGenerationAt": "1.24.0",
"endGenerationAt": false
},
"sidebar": {
"showVersionSlection": true,
"enableTypeSorting": true
},
"opts": {
"destination": "./docs/",
"removeEmptyFiles": true,
"removeEmptyTages": true
}
}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ yarn-error.log*
.env
tools/
tests/
cache/
18 changes: 18 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { head, nav, sidebar } = require('./configs/index.js');

export default {
head: head,
themeConfig: {
logo: "/images/logo.png",
siteTitle: "whatsapp-web.js",
editLink: false,
aside: false,
lastUpdated: false,
docFooter: {
prev: false,
next: false
},
nav: nav,
sidebar: sidebar
}
};
5 changes: 5 additions & 0 deletions docs/.vitepress/configs/head.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const head = [
['link', { rel: 'icon', href: '/icons/favicon/logo_32x32.png' }],
['link', { rel: 'icon', href: '/icons/favicon/logo_16x16.png' }],
['link', { rel: 'shortcut icon', href: '/icons/favicon/logo_shortcut.ico' }]
];
3 changes: 3 additions & 0 deletions docs/.vitepress/configs/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './head.js'
export * from './sidebar.js'
export * from './nav.js'
11 changes: 11 additions & 0 deletions docs/.vitepress/configs/nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const nav = [
{
text: "API",
link: "/",
activeMatch: "/"
},
{
text: "Version",
items: []
}
];
1 change: 1 addition & 0 deletions docs/.vitepress/configs/sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const sidebar = [];
65 changes: 0 additions & 65 deletions docs/Base.html

This file was deleted.

65 changes: 0 additions & 65 deletions docs/BaseAuthStrategy.html

This file was deleted.

Loading
Loading