Creating the dartdoc SDK

Is it possible to create dartdoc from $ DART_SDK or from bleeding_edge? I tried this with unittest :

 dartdoc bleeding_edge-master/dart/pkg/unittest/lib/unittest.dart 

And it works, but when I do it aync

 dartdoc bleeding_edge-master/dart/sdk/lib/async/async.dart 

Fails:

 library dart.async; ^^^^^^^^^^ /Applications/dart/dart-sdk/lib/async/async.dart:5:9: Warning: duplicated library name "dart.async". library dart.async; ^^^^^^^^^^ bleeding_edge-master/dart/sdk/lib/async/deferred_load.dart:40:3: Error: External method without an implementation. external Future<bool> load(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: generation failed: Failed to create mirror system. 

I want it to play json doc files in 0 generated directory. How can i do

+4
source share
1 answer

You cannot run vanilla dartdoc in the built-in core dart: libraries. Since it implicitly reads in these libraries on its own, you get duplicate definition errors.

Instead, there is a separate apidoc tool in the Dart repository that we use to create documents in the main library. It is built on top of dartdoc, but has several modifications to do some special things.

It starts automatically as part of the build process, so if you just clone the Dart report and run tools/build.py , you will get the api_docs directory in the output directory containing the documents.

+1
source

Source: https://habr.com/ru/post/1487167/


All Articles