Commit graph

13 commits

Author SHA1 Message Date
Greg Spencer a7310dc0d4
Eliminate uses of pub executable in docs publishing and sample analysis. (#89181) 2021-08-30 12:16:05 -07:00
Greg Spencer 10e4b04010
Switch document generation to use the snippets package (#87231)
Switch document generation to use the snippets package instead of the snippets code in the Flutter repo. In the process, some bugs in sample code analysis have been fixed, and I've fixed some more errors in the samples.

This will allow the snippets package to be developed separately from the Flutter repo, and reduce the code in the Flutter repo.

The snippets code is deleted in this PR.

I also converted some comments in the snippet templates to be regular comments instead of doc comments, because having a doc comment block before the imports causes the Dart import sorter to lose the comment. They should have been regular comments in the first place.

The snippets package resides in the assets-for-api-docs repo.

The sample analysis has also been converted to be run in parallel, and I've bumped the Dartdoc version to 1.0.2.
2021-08-11 19:48:29 -07:00
Janice Collins e9a9a6104c
Update dartdoc to 0.35.0 (#67432) 2020-10-07 08:47:05 -07:00
Michael Goderbauer 923eb765f0
Bump dartdoc to 0.34.0 (#66048) 2020-09-22 12:57:13 -07:00
Michael Goderbauer 94f76d614c
Alphabetize warning list (#62611) 2020-07-31 10:01:03 -07:00
Michael Goderbauer 6ca8fda978
After cleaning up 812 warnings: Make warnings fatal in dartdocs (#62553) 2020-07-30 14:11:23 -07:00
Michael Goderbauer f4e10b4fb5
Make dartdoc warnings fatal (& cleanup of warnings) (#62367) 2020-07-28 16:11:04 -07:00
Michael Goderbauer 4b4287ba78
Make it an error to break macros in docs (and fix existing broken macros) (#62071) 2020-07-23 08:29:46 -07:00
Greg Spencer fabf4e3d0d Reverse the sense of the terms snippet and sample. (#48254) 2020-01-08 15:28:02 -08:00
Andrew Brogdon 691977755c
Adds DartPad option to the DartDoc snippet generator. (#39924) 2019-09-10 08:36:14 -07:00
Greg Spencer 9d878ca493
Remove snippets snapshotting hack from dartdoc generation. (#24812)
Now that dartdoc automatically generates snapshots for external dart tools, I can remove my path hack from the dartdoc_options.yaml file.

This will allow other packages to again build dartdocs (e.g. plugins) that link to Flutter's dartdocs, and allow me to re-enable dartdoc's cross-linking test that was disabled because of this hack.
2018-11-27 22:31:49 -08:00
Greg Spencer 094f93dfcf
Fixes several bugs in samples, quotes HTML properly, and pre-compiles snippet tool. (#24020)
When converting all of the samples to use the snippet tool, I encountered some bugs/shortcomings:

1. The document production took 90 minutes, since the snippet tool was being invoked from the command line each time. I fixed this by snapshotting the executable before running, so it's down to 7 minutes.

2. The sample code was not being properly escaped by the snippet tool, so generics were causing issues in the HTML output. It is now quoted.

3. Code examples that used languages other than Dart were not supported. Anything that highlight.js was compiled for dartdoc with is now supported.

4. The comment color for highlight.js was light grey on white, which was pretty unreadable. It's now dark green and bold.
2018-11-07 08:29:14 -08:00
Greg Spencer 65d3ddd5d1
Dartdoc snippet extension to inject full featured code snippets in to API docs. (#23281)
This creates a custom dartdoc tool that will generate snippet blocks in our API docs that allow the user to copy easily to the clipboard, and will also embed the snippet code into a template to show it in a larger context with an app.

This PR adds the snippet tool, a template, and a couple of HTML skeleton files, one for snippets that are designed to be in an application setting, and one where it simply puts a nice container around existing snippets, making them easier to copy to the clipboard.
2018-10-23 13:50:24 -07:00