Skip to content

Commit

Permalink
Setup JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Jul 12, 2019
1 parent bf8300f commit 62e032e
Show file tree
Hide file tree
Showing 8 changed files with 336 additions and 157 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/coverage/
/cypress/
/dist/
/docs/shepherd.js/
/esdoc/
/node_modules/
/test/unit/dist
Expand Down
39 changes: 39 additions & 0 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
'use strict';

module.exports = {
tags: {
allowUnknownTags: true,
dictionaries: ['jsdoc']
},
source: {
include: [
'package.json',
'README.md',
'./src/js/shepherd.js',
'./src/js/step.js',
'./src/js/tour.js'
]
},
plugins: [
'plugins/markdown'
],
sourceType: 'module',
templates: {
referenceTitle: 'Shepherd.js',
// Do not disable sorting
disableSort: false,
// Do not collapse, show all methods
collapse: false
// 'resources': {
// 'google': 'https://www.google.com/'
// }
},
opts: {
destination: './docs/',
encoding: 'utf8',
// Do not include functions marked `@private`
private: false,
recurse: true,
template: './node_modules/jsdoc-template'
}
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- yarn esdoc
before_deploy:
- git add -f --all dist/
- git add -f --all esdoc/
- git add -f --all docs/
deploy:
provider: pages
skip-cleanup: true
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
],
"scripts": {
"build": "yarn clean && rollup -c",
"docs": "node_modules/.bin/jsdoc -c .jsdoc.js --verbose",
"esdoc": "esdoc",
"changelog": "github_changelog_generator -u shipshapecode -p shepherd --since-tag v2.9.0",
"clean": "rimraf dist",
Expand All @@ -49,6 +50,7 @@
"dependencies": {
"body-scroll-lock": "^2.6.3",
"element-matches": "^0.1.2",
"jsdoc": "^3.6.2",
"smoothscroll-polyfill": "^0.4.4",
"tippy.js": "^5.0.0-alpha.2"
},
Expand All @@ -62,6 +64,7 @@
"babel-jest": "^24.7.1",
"babel-plugin-rewire-exports": "^1.2.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"better-docs": "^1.1.6",
"chai": "^4.2.0",
"codeclimate-test-reporter": "^0.5.1",
"cssnano": "^4.1.10",
Expand All @@ -79,6 +82,8 @@
"jest": "^24.8.0",
"jest-expect-message": "^1.0.2",
"jest-transform-css": "^2.0.0",
"jsdoc-mermaid": "^1.0.0",
"jsdoc-template": "https://github.com/braintree/jsdoc-template",
"mutationobserver-shim": "^0.3.3",
"postcss": "^7.0.14",
"replace": "^1.1.0",
Expand Down
Loading

0 comments on commit 62e032e

Please sign in to comment.