Skip to content

Commit

Permalink
Start on TS support for JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Mar 4, 2024
1 parent 0e10bb7 commit c3f1dea
Show file tree
Hide file tree
Showing 7 changed files with 635 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
pnpm i
pnpm build
- name: Build docs
run: pnpm docs
run: pnpm run docs
- name: Publish site and docs
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
39 changes: 25 additions & 14 deletions .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ module.exports = {
source: {
include: [
'package.json',
'README.md',
'./src/shepherd.ts',
'./src/step.ts',
'./src/tour.ts'
]
],
includePattern: '\\.(json|js|ts)$'
},
plugins: [
'plugins/markdown'
],
plugins: ['plugins/markdown', 'node_modules/better-docs/typescript'],
sourceType: 'module',
opts: {
destination: './site/docs/',
encoding: 'utf8',
// Do not include functions marked `@private`
private: false,
readme: 'README.md',
recurse: true,
template: './node_modules/jsdoc-template-ship-shape',
tutorials: './docs-src/tutorials'
},
templates: {
referenceTitle: 'Shepherd.js',
favicon: '/landing/public/favicons/favicon-32x32.png',
Expand All @@ -28,15 +36,18 @@ module.exports = {
collapse: false,
resources: {
Demo: 'https://shepherdjs.dev/'
},
'better-docs': {
navLinks: [
{
label: 'Demo',
href: 'https://shepherdjs.dev/'
},
{
label: 'GitHub',
href: 'https://github.com/shepherd-pro/shepherd'
}
]
}
},
opts: {
destination: './site/docs/',
encoding: 'utf8',
// Do not include functions marked `@private`
private: false,
recurse: true,
template: './node_modules/jsdoc-template-ship-shape',
tutorials: './docs-src/tutorials'
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^29.7.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"better-docs": "^2.7.3",
"chai": "^4.3.10",
"codeclimate-test-reporter": "^0.5.1",
"cssnano": "^6.0.3",
Expand Down
Loading

0 comments on commit c3f1dea

Please sign in to comment.