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

jsdoc output #3910

Merged
merged 12 commits into from
Jan 24, 2017
34 changes: 34 additions & 0 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
{
"source": {
"include": [ "src/js/" ],
"includePattern": ".js$"
},
"opts": {
"destination": "docs/api",
"readme": "docs/index.md",
"template": "node_modules/tui-jsdoc-template",
"package": "package.json",
"recurse": true,
"tutorials": "docs/guides",
"encoding": "utf8"
},
"templates": {
"default": {
"staticFiles": {
"include": ["build/docs/"]
}
},
"logo": {
"url": "http://videojs.com/img/logo.png",
"height": "30px",
"width": "214px"
},
"name": "Video.js Documentation",
"tabNames": {
"tutorials": "Guides"
},
"footerText": "<span class='copyright'><a href='http://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> <ul class='other-links'><li><a href='http://videojs.com' class='button white'><i class='fa fa-external-link'></i> Video.js</a></li> <li><a href='https://twitter.com/videojs' class='button white' target='_blank'><i class='fa fa-twitter'></i> @videojs</a></li> <li><a href='http://github.com/videojs/video.js' class='button white' target='_blank'><i class='fa fa-github-alt'></i> Source</a></li> </ul>",
"css": [
"styles/videojs.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css"
]
},
"plugins": ["plugins/markdown"],
"markdown": {
"tags": ["example"]
Expand Down
29 changes: 29 additions & 0 deletions build/docs/styles/videojs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#resizer,
footer {
background-color: #ECEEF1;
color: #868688;
padding: 3px 10px;
}

.footer-text {
padding: 3px;
display: block;
}

footer .copyright {
float: left;
}

footer .other-links {
margin: 0;
padding: 0;
float: right;
}

footer .other-links li {
display: inline;
}

footer .logo {
display: none;
}
10 changes: 5 additions & 5 deletions docs/faq.md → docs/guides/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ Yes! Please [submit an issue or open a pull request][pr-issue-question] if this

Yes! Please [submit an issue or open a pull request][pr-issue-question] if this does not work.

[plugin-guide]: ./guides/plugins.md
[plugin-guide]: plugins.md

[install-guide]: http://videojs.com/getting-started/

[troubleshooting]: ./guides/troubleshooting.md
[troubleshooting]: troubleshooting.md

[video-tracks]: ./guides/video-tracks.md
[video-tracks]: video-tracks.md

[audio-tracks]: ./guides/audio-tracks.md
[audio-tracks]: audio-tracks.md

[text-tracks]: ./guides/text-tracks.md
[text-tracks]: text-tracks.md

[pr-issue-question]: #q-i-think-i-found-a-bug-with-videojs-or-i-want-to-add-a-feature-what-should-i-do

Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
"start": "grunt dev",
"test": "grunt test",
"docs": "npm run docs:lint && npm run docs:api",
"docs:api": "jsdoc -r src/js -d docs/api -c .jsdoc.json",
"jsdoc": "jsdoc",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will only cause "There are no input files to process.", maybe we should skip this script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is like the grunt task above, it's so that you can more easily run jsdoc commands on the cli without installing it globally if jsdoc -c .jsdoc.json doesn't suit what you're trying to do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems outside of the scope of what scripts should do. I think its easy enough to do ./node_modules/.bin/jsdoc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pretty common pattern nowadays.

"docs:api": "jsdoc -c .jsdoc.json",
"docs:lint": "remark -- './**/*.md'",
"docs:fix": "remark --output -- './**/*.md'",
"babel": "babel src/js -d es5"
"babel": "babel src/js -d es5",
"prepublish": "not-in-install && npm run docs:api || in-install"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this right this script will only build the docs prepublish but not when npm install is run on the project. Is that right? (if so this is awesome, and I had no idea that we could do this)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that's what this does.

},
"repository": {
"type": "git",
Expand Down Expand Up @@ -87,6 +89,7 @@
"grunt-version": "~1.1.1",
"grunt-videojs-languages": "0.0.4",
"grunt-zip": "0.17.1",
"in-publish": "^2.0.0",
"istanbul": "^0.4.5",
"jsdoc": "^3.4.2",
"karma": "^1.2.0",
Expand Down Expand Up @@ -114,6 +117,7 @@
"shelljs": "^0.7.5",
"sinon": "^1.16.1",
"time-grunt": "^1.1.1",
"tui-jsdoc-template": "^1.1.0",
"uglify-js": "~2.7.3",
"videojs-doc-generator": "0.0.1",
"videojs-standard": "^6.0.1",
Expand Down