Skip to content

docs/NODE_API.md is out of date #585

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

Closed
crucialfelix opened this issue Nov 5, 2016 · 5 comments
Closed

docs/NODE_API.md is out of date #585

crucialfelix opened this issue Nov 5, 2016 · 5 comments
Assignees

Comments

@crucialfelix
Copy link

This is not the api that is exposed by the documentation package:

https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md

This is what is exported:

{ lint: [Function: lint],
  expandInputs: [Function: expandInputs],
  buildSync: [Function: buildSync],
  build: [Function: build],
  formats:
   { html: [Function: html],
     md: [Function],
     remark: [Function: remark],
     json: [Function] },
  util: { createFormatters: [Function], createLinkerStack: [Function] } }

I was hoping to use documentation.js to return the raw parsed data (comments etc.) but it seems that it only builds. It would be useful to use it as a library.

@tmcw
Copy link
Member

tmcw commented Nov 7, 2016

Indeed, we should probably only show the index.js API there: right now the documentation is for all code, not just the exposed parts.

You can indeed do exactly what you want - build returns raw parsed data as JSON.

@crucialfelix
Copy link
Author

build isn't even in the docs/NODE_API.md ;)

Is it not ironic that you haven't documented your own project ? I'm sure you are working on that for the 4.0.0 release.

I've written a React static renderer for this (or any jsdoc dump). I needed the flowtypes properly formatted and I found React to be easier to compose with than handlebars.

@tmcw
Copy link
Member

tmcw commented Nov 8, 2016

Sure, it's ironic, and unfortunately a source of some embarrassment. This is a project I work on as much as I can, given professional and personal responsibilities, and some things have fallen by the wayside when those other life things come up. I'd much appreciate if you could help, rather than displaying schadenfreude :)

@crucialfelix
Copy link
Author

Oh sorry it wasn't schadenfreude at all ! It was sympathy and understanding but I should have been clearer.

I noticed a bunch of things that are WIP and not complete (the themes especially) so I figured out that mapbox/life isn't letting you finish it as you had hoped.

I'm over committed myself by quite a bit. I hope I can help a bit as we really need a decent doc solution in the ES2015 world.

esdoc doesn't allow or accept any customization and cannot parse and merge flowtype annotations.

I will release the react renderer. I didn't figure out how to plug it directly into documentation.js - I just dump JSON and then run mine on that output.

@tmcw tmcw self-assigned this Nov 9, 2016
@tmcw
Copy link
Member

tmcw commented Nov 11, 2016

NODE_API is back up to date and now only shows exposed API surface! https://github.com/documentationjs/documentation/blob/master/docs/NODE_API.md

@tmcw tmcw closed this as completed Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants