dartdoc.
This tool is deprecated in favor ofPlease use the new dartdoc tool.
dartdoc-viewer
The front-end Dart documentation viewer.
Here is how our tests are doing:
Running Dartdoc-Viewer
The viewer uses JSON files generated by the docgen package (currently found in pkg/docgen/ in the Dart repository) to display documentation.
Running Locally
There are two ways to run the viewer locally: in the Dart VM with Dartium or compiled to JavaScript.
Place the JSON files generated from docgen in client/local. Then, depending on whether you're running in Dartium or another browser, follow the directions below:
In Dartium
From the Editor, right click file client/web/index.html and select "Run in
Dartium." OR, if you are developing without the editor, start a simple server
standing in the top level of this package (such as python -m SimpleHttpServer
) and direct Dartium to
localhost:$PORT_NUMBER/client/web/index.html.
In Any Browser, Compiled to JavaScript
While standing in the client
directory, type pub build
. This produces
the Javascript and a deployable website at client/build
. As with Dartium, you
can run in the Editor by right clicking file client/web/index.html
and select
"Run as JavaScript", OR start a simple server while standing in the top level
of this package (such as python -m SimpleHttpServer
) and direct any browser
to localhost:$PORT_NUMBER/client/web/index.html.
Deployment
Simply copy the entire client/build
directory to your deployment server to
serve your data.
Special Instructions for Deploying on App Engine, for Official Dart API site
A script streamlining these steps will be forthcoming.
-
Edit
client/lib/shared.dart
so that theuseHistory
boolean istrue
(You can use this setting with any site on App Engine, provided you resolve the URLs similarly to server/scripts/redirector.py in api.dartlang.org. -
Ensure you have a file at lib/config/config.yaml, which contains the key for Google Analytics for your website. Main Dart API site's file can be found here: Link TBD.
-
Compile the site to JavaScript, by typing
pub build
while standing in theclient
directory. -
If there is a docs folder inside
client/build
, delete it (the JSON files are served separately out of Google Cloud Storage, so they should not be uploaded to App Engine). -
Check out your App Engine site. In our case: api.dartlang.org
-
Copy the
client/build
directory toserver/out/web
in your api.dartlang.org checkout. -
Download the Google App Engine SDK for Python and add it to your PATH.
-
Run
appcfg.py update <folder containing app.yaml>
.