All Projects → dart-archive → dartdoc-viewer

dart-archive / dartdoc-viewer

Licence: other
deprecated. Use dartdoc instead.

Programming Languages

dart
5743 projects
HTML
75241 projects
CSS
56736 projects
shell
77523 projects

This tool is deprecated in favor of dartdoc.

Please use the new dartdoc tool.


dartdoc-viewer

The front-end Dart documentation viewer.

Here is how our tests are doing: Build Status

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.

  1. Edit client/lib/shared.dart so that the useHistory boolean is true (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.

  2. 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.

  3. Compile the site to JavaScript, by typing pub build while standing in the client directory.

  4. 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).

  5. Check out your App Engine site. In our case: api.dartlang.org

  6. Copy the client/build directory to server/out/web in your api.dartlang.org checkout.

  7. Download the Google App Engine SDK for Python and add it to your PATH.

  8. Run appcfg.py update <folder containing app.yaml>.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].