Skip to content

Commit

Permalink
Update typescript and jsdoc, use @import (#8723)
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed May 15, 2024
1 parent 7b0aede commit f05769d
Show file tree
Hide file tree
Showing 73 changed files with 367 additions and 244 deletions.
69 changes: 69 additions & 0 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"use strict";

const pkg = require('./package.json');

module.exports = {
source: {
include: ['src/js/'],
includePattern: '.js$',
},
opts: {
destination: 'docs/api',
readme: 'docs/index.md',
template: 'node_modules/clean-jsdoc-theme',
package: '',
recurse: true,
encoding: 'utf8',
theme_opts: {
homepageTitle: 'Video.js API docs',
menu: [
{
title: 'Video.js website',
link: 'https://videojs.com',
class: 'link-vjs',
},
{
title: `v${pkg.version} source`,
link: 'https://github.com/videojs/video.js',
class: 'link-gh',
},
{
title: 'Twitter',
link: 'https://twitter.com/videojs',
class: 'link-tw',
},
],
favicon: 'https://videojs.com/favicon.ico',
footer:
'<span class="copyright"><a href="https://videojs.com">Video.js</a> is a free and open source HTML5 video player. © <a href="https://brightcove.com" target="_blank">Brightcove, Inc</a>. <a href="https://github.com/videojs/video.js/blob/master/LICENSE" class="button blue" target="_blank">View license</a></span>',
include_css: ['./build/docs/styles/videojs.css'],
displayModuleHeade: true,
meta: [
{
name: 'name',
content: 'Video.js API documentation',
},
{
name: 'description',
content:
`Generated API documentation for the latest version of Video.js (${pkg.version}).`,
},
],
},
},
templates: {
default: {
staticFiles: {
include: ['build/docs/'],
},
},
},
plugins: [
'plugins/markdown',
'build/jsdoc-typeof-plugin',
],
markdown: {
tags: ['example'],
idInHeadings: true,
},
};
72 changes: 0 additions & 72 deletions .jsdoc.json

This file was deleted.

12 changes: 0 additions & 12 deletions build/doc-version.js

This file was deleted.

103 changes: 46 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"test:a11y": "node build/test-a11y.js",
"test:unit": "karma start test/karma.conf.js",
"docs": "npm-run-all clean docs:lint docs:api",
"docs:api": "node ./build/doc-version.js && jsdoc -c .jsdoc.json",
"docs:api": "jsdoc -c .jsdoc.js",
"postdocs:api": "node ./build/fix-api-docs.js",
"docs:lint": "remark -- \"./{,!(node_modules)/**/}!(CHANGELOG)*.md\"",
"docs:fix": "remark --output -- \"./{,!(node_modules)/**/}!(CHANGELOG)*.md\"",
Expand Down Expand Up @@ -125,8 +125,7 @@
"humanize-duration": "^3.26.0",
"husky": "^1.3.1",
"is-ci": "^3.0.0",
"jsdoc": "^3.6.11",
"jsdoc-tsimport-plugin": "^1.0.5",
"jsdoc": "^4.0.3",
"karma": "^6.4.0",
"lint-staged": "^10.5.4",
"markdown-table": "^1.1.3",
Expand Down Expand Up @@ -162,7 +161,7 @@
"shelljs": "^0.8.5",
"shx": "^0.3.2",
"sinon": "^11.1.1",
"typescript": "^4.8.4",
"typescript": "^5.5.0-beta",
"uglify-js": "^3.6.0",
"unified": "^7.0.2",
"videojs-generate-karma-config": "^8.0.1",
Expand Down
Loading

0 comments on commit f05769d

Please sign in to comment.