DescriptionAdd a mode to dartdoc to generate the navigation on the client.
Right now, the generated docs are pretty huge (100MB for all of the main libs). This is mainly
because each generated HTML page includes full navigation for each type in the containing
library. For stuff like dart:html, that's tons of HTML. Even after compression, the docs are
9.2MB. Also, they take a long time to generate (30s on my laptop).
This patch adds a mode you can use called "live-nav" (and makes it the default). With that
mode, pages do not include navigation. Instead, we generate a single nav.json file with the
navigation data. Client-side Dart code does an XHR for that and then renders the navigation
on the fly.
This gets the generated docs down to 13.3MB (2MB after compression) and gets doc generation
up to 6.3s for everything.
The two downsides are:
1. There's a visible flash on page load when it renders the nav since it's asynchronous.
2. You can't browse docs locally just using file://. To be able to XHR the nav.json, you
either need to enable file access in your browser or run a local server.
Committed: https://code.google.com/p/dart/source/detail?r=3445
Patch Set 1 #
Total comments: 17
Patch Set 2 : Respond to review. #
Messages
Total messages: 3 (0 generated)
|