mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Generate API docs with vuepress-plugin-typedoc (#8755)
* Generate API docs with vuepress-plugin-typedoc * Links, fixes, cleanup
This commit is contained in:
parent
4b7b3f277f
commit
93e07ebb48
2
.github/release-drafter.yml
vendored
2
.github/release-drafter.yml
vendored
@ -45,7 +45,7 @@ template: |
|
||||
* [npm](https://www.npmjs.com/package/chart.js)
|
||||
* [Migration guide](https://www.chartjs.org/docs/next/getting-started/v3-migration)
|
||||
* [Docs](https://www.chartjs.org/docs/next/)
|
||||
* [API](https://www.chartjs.org/docs/next/typedoc/)
|
||||
* [API](https://www.chartjs.org/docs/next/api/)
|
||||
* [Samples](https://www.chartjs.org/samples/next/)
|
||||
|
||||
$CHANGES
|
||||
|
||||
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -71,7 +71,6 @@ jobs:
|
||||
if: steps.changes.outputs.docs == 'true'
|
||||
run: |
|
||||
npm run docs
|
||||
npm run typedoc
|
||||
npm pack
|
||||
- name: Coveralls Parallel - Chrome
|
||||
if: steps.changes.outputs.src == 'true'
|
||||
|
||||
1
.github/workflows/deploy-docs.yml
vendored
1
.github/workflows/deploy-docs.yml
vendored
@ -29,7 +29,6 @@ jobs:
|
||||
npm run build
|
||||
./scripts/docs-config.sh "master"
|
||||
npm run docs
|
||||
npm run typedoc
|
||||
npm pack
|
||||
./scripts/deploy-docs.sh "master"
|
||||
env:
|
||||
|
||||
1
.github/workflows/npmpublish.yml
vendored
1
.github/workflows/npmpublish.yml
vendored
@ -47,7 +47,6 @@ jobs:
|
||||
npm run build
|
||||
./scripts/docs-config.sh "${VERSION}"
|
||||
npm run docs
|
||||
npm run typedoc
|
||||
npm pack
|
||||
env:
|
||||
VERSION: ${{ needs.setup.outputs.version }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -9,9 +9,10 @@ node_modules/
|
||||
npm-debug.log*
|
||||
|
||||
# Docs
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
build/
|
||||
# generated typedocs
|
||||
docs/api
|
||||
|
||||
# Development
|
||||
.DS_Store
|
||||
|
||||
@ -19,6 +19,19 @@ module.exports = {
|
||||
'ga': 'UA-28909194-3'
|
||||
}
|
||||
],
|
||||
[
|
||||
'vuepress-plugin-typedoc',
|
||||
|
||||
{
|
||||
entryPoints: ['../../types/index.esm.d.ts'],
|
||||
hideInPageTOC: true,
|
||||
tsconfig: '../../tsconfig.json',
|
||||
sidebar: {
|
||||
fullNames: true,
|
||||
parentCategory: 'API',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
chainWebpack(config) {
|
||||
config.merge({
|
||||
@ -49,6 +62,7 @@ module.exports = {
|
||||
},
|
||||
nav: [
|
||||
{text: 'Home', link: '/'},
|
||||
{text: 'API', link: '/api/'},
|
||||
// TODO: Make local when samples moved to vuepress
|
||||
{text: 'Samples', link: `https://www.chartjs.org/samples/${docsVersion}/`},
|
||||
{
|
||||
@ -62,6 +76,9 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
sidebar: {
|
||||
'/api/': {
|
||||
title: 'API'
|
||||
},
|
||||
'/': [
|
||||
'',
|
||||
{
|
||||
@ -148,7 +165,7 @@ module.exports = {
|
||||
children: [
|
||||
'developers/',
|
||||
'developers/api',
|
||||
[`https://chartjs.org/docs/${docsVersion}/typedoc/`, 'TypeDoc'],
|
||||
['api/', 'TypeDoc'],
|
||||
'developers/updates',
|
||||
'developers/plugins',
|
||||
'developers/charts',
|
||||
|
||||
@ -122,7 +122,7 @@ var chart = new Chart(ctx, {
|
||||
|
||||
## Plugin Core API
|
||||
|
||||
Read more about the [existing plugin extension hooks](https://github.com/chartjs/Chart.js/blob/master/types/index.esm.d.ts).
|
||||
Read more about the [existing plugin extension hooks](../api/interfaces/plugin).
|
||||
|
||||
### Chart Initialization
|
||||
|
||||
|
||||
15
package-lock.json
generated
15
package-lock.json
generated
@ -14782,6 +14782,15 @@
|
||||
"integrity": "sha512-Jd5fYTiqzinZdoIY382W7tQXTwAzWRdg8KbHfaxmb78m1/3jL9riXtk23oBOKwhi8GFVykCOdPzEJKY87/D0LQ==",
|
||||
"dev": true
|
||||
},
|
||||
"typedoc-plugin-markdown": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.6.0.tgz",
|
||||
"integrity": "sha512-fg4xby3awJVVxB8TdhHNsZQfiTC5x1XmauVwhKXc6hGeu1bzTnqrkmDT8NCjxfUgw64si8cUX1jBfBjAHthWpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"handlebars": "^4.7.6"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz",
|
||||
@ -15590,6 +15599,12 @@
|
||||
"integrity": "sha512-jooDlcMdBqhXgIaF1awFSaOTM56mleP6bbCiGxyQxTZexfvCfDvZhNLGpyXqMQA50ZmNGmvLrK82YYb63k1jfA==",
|
||||
"dev": true
|
||||
},
|
||||
"vuepress-plugin-typedoc": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/vuepress-plugin-typedoc/-/vuepress-plugin-typedoc-0.6.0.tgz",
|
||||
"integrity": "sha512-o4VdBs1U8Z7RboRoK3txiXony46ANELCQmcOaH3JijSdh+zx/e4jkrYbUWmN72zx9yFIE2dONdLQreDyUjlHbg==",
|
||||
"dev": true
|
||||
},
|
||||
"vuepress-theme-chartjs": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vuepress-theme-chartjs/-/vuepress-theme-chartjs-0.2.0.tgz",
|
||||
|
||||
@ -46,8 +46,7 @@
|
||||
"lint-tsc": "tsc",
|
||||
"lint-types": "eslint \"types/**/*.ts\" && tsc -p types/tests/",
|
||||
"lint": "concurrently \"npm:lint-*\"",
|
||||
"test": "npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep",
|
||||
"typedoc": "npx typedoc"
|
||||
"test": "npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kurkle/color": "^0.1.9",
|
||||
@ -90,11 +89,13 @@
|
||||
"rollup-plugin-istanbul": "^3.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"typedoc": "^0.20.32",
|
||||
"typedoc-plugin-markdown": "^3.6.0",
|
||||
"typescript": "^4.1.5",
|
||||
"vue-tabs-component": "^1.5.0",
|
||||
"vuepress": "^1.8.2",
|
||||
"vuepress-plugin-redirect": "^1.2.5",
|
||||
"vuepress-plugin-tabs": "^0.3.0",
|
||||
"vuepress-plugin-typedoc": "^0.6.0",
|
||||
"vuepress-theme-chartjs": "^0.2.0",
|
||||
"yargs": "^16.2.0"
|
||||
}
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
},
|
||||
"typedocOptions": {
|
||||
"name": "Chart.js",
|
||||
"entryPoints": ["src/index.esm.js"],
|
||||
"entryPoints": ["types/index.esm.d.ts"],
|
||||
"readme": "none",
|
||||
"excludeExternals": true,
|
||||
"includeVersion": true,
|
||||
"out": "./dist/docs/typedoc"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user