-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
switch to documentation for documentation #952
Conversation
It's nice for small modules, but I'm not convinced it will look good with https://www.mapbox.com/mapbox-gl-js/api/ — no table layout for methods/properties and many times more verbose / less skimmable. |
This is no longer the case
This isn't specific enough to fix |
I mean methods and properties, not parameters. Generally, something that takes one row in the current docs will take a whole screen when converted to generated docs without necessarily improving documentation content (more detailed !== better), making the docs much harder to read. |
So... what you're saying is that we should improve doxme? Like, it's software that I wrote and can be improved like other software. |
@tmcw yes, I'm now reading about jsdoc and scratching my head around how to make Leaflet-like docs from dox-generated output. :) |
Yeah, likewise I just spent a few hours with dox + doxme and quickly got convinced that they're not going to work very well for OO libraries. There's not really any support in dox for object hierarchies, instance methods, etc. Which is fair, it's a hard problem and dox is aiming for a simple solution for the small module crowd. See e.g. tj/dox#85 and tj/dox#129. I was also discouraged by the ad hoc and regexp-driven analysis, which leads to frustrations like tj/dox#150. |
Hm, what about jdoc itself though? On Tue, Feb 10, 2015 at 8:07 PM, John Firebaugh notifications@github.com
|
Yeah, jsdoc itself seems flexible enough. Here's what I cooked up for mapbox-directions.js based on a rudimentary understanding of jsdoc. |
I started working on this in a
/ **
* @param {Object} options
* @param {String} options.type Either `raster` or `vector`
*/
// Not sure if there's a different way to do this but seems to be the jsdoc way.
|
👍 I had not seen that syntax before, but it is documented as the jsdoc way.
👍
"This marks an object as being a function, even though it may not appear to be one to the parser." I.e. this tag is mainly a workaround for poor tooling or sketchy code. We'll have to see where we end up with for tooling, but ideally this isn't necessary.
You can if you want, but we should do so in a way that excludes them from generated docs, e.g. use single star
I think we should stop exporting |
Added some quick formatting & code highlighting to the rendered API page. @jfirebaugh 🔙 2️⃣ 👈 |
Example: cutting-room-floor/mapbox-gl-style-lint@06747a4