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

JSON output #1667

Open
isoos opened this issue Apr 13, 2018 · 5 comments
Open

JSON output #1667

isoos opened this issue Apr 13, 2018 · 5 comments
Labels
P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@isoos
Copy link
Contributor

isoos commented Apr 13, 2018

I'm wondering how hard would it be to produce a machine-readable JSON output instead of (or alongside) the .html files. I'm aware that dartdoc generates an index.json for search, but I have a bit broader scope in mind, with the following use cases:

  • Pub site's analyzer (pana) could not only validate whether dartdoc runs successfully, but it could also check the length of the documentation of the given package.

  • Pub site's search is planning to search inside the package content, and the most straightforward way would be to use the index.json file (or at least an extended version of it). If we would have a broader extract, we could search not only in method names, but also in their documentation.

Some related issues to track:

@jcollins-g jcollins-g added type-enhancement A request for a change that isn't a bug P2 A bug or feature request we're likely to work on labels Apr 17, 2018
@jcollins-g
Copy link
Contributor

The answer is in general, not that hard (assuming you get past the setup issues in #1609). Dartdoc has generators and you could write alternates that would do this.

@isoos
Copy link
Contributor Author

isoos commented Apr 17, 2018

I gave up on #1609, because pub global activate works for reasonable control over the version. We can close that issue if you don't plan to work on it anytime soon.

Is there a generator that I can use as a base if we were to go with that route?

@jcollins-g
Copy link
Contributor

I am actively working on #1609 for other reasons (cleaning up that interface has wins internally to dartdoc, the one big repo case, etc).

Unfortunately, the example is all private inside the dartdoc repo, but this is the generator construction for dartdoc:

https://github.com/dart-lang/dartdoc/blob/master/lib/src/html/html_generator.dart#L52

I'd eventually like alternate cases like this to be different binaries inside the dartdoc repo -- if you can structure your code that way that'd be most excellent. Another reason why I'm working on #1609.

@hxgqh
Copy link

hxgqh commented Sep 10, 2023

Any plan for this feature?

@srawlins
Copy link
Member

There are no plans for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants