Skip to content

Commit 0a0135a

Browse files
authored
Improve package description and add brief example reference (#2079)
* Improve package description and add brief example reference * Move pub to end and put a warning on it * Fix test * dartfmt
1 parent 526fc4e commit 0a0135a

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

example/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# dartdoc examples
2+
3+
Dartdoc is typically used as a command line utility to support generating
4+
documentation served on websites. In the future this directory may contain
5+
direct examples, but for now, here are pointers to the main users of dartdoc
6+
in the Dart ecosystem.
7+
8+
## Dart SDK
9+
10+
The Dart team builds docs for the [Dart API reference](https://api.dart.dev/)
11+
with each new version of the SDK, via
12+
[this script](https://github.com/dart-lang/sdk/blob/master/tools/bots/dart_sdk.py).
13+
Look for `BuildDartdocAPIDocs`.
14+
15+
## Flutter
16+
17+
The Flutter team builds [API documentation for the Flutter SDK](https://api.flutter.dev)
18+
automatically. A [shell script](https://github.com/flutter/flutter/blob/master/dev/bots/docs.sh)
19+
wraps a [small dart program](https://github.com/flutter/flutter/blob/master/dev/tools/dartdoc.dart)
20+
that manages the process.
21+
22+
## pub
23+
24+
The [pub package website](https://pub.dev) automatically builds Dart
25+
[API documentation](https://pub.dev/documentation/dartdoc/latest/)
26+
for [uploaded packages](https://pub.dev/packages/dartdoc).
27+
28+
Note, unlike the other two examples, here dartdoc is used as a library. While we make some
29+
effort not to regularly break simple uses of the library interface, we strongly recommend
30+
you use the command line and focus our semantic versioning around that case. However, if
31+
that doesn't work for your case, the pub site usage may be of interest. See
32+
[this script](https://github.com/dart-lang/pub-dev/blob/master/pkg/pub_dartdoc/bin/pub_dartdoc.dart)
33+
for the entry point.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dartdoc
22
# Run `grind build` after updating.
33
version: 0.29.1
44
author: Dart Team <[email protected]>
5-
description: A documentation generator for Dart.
5+
description: A non-interactive HTML documentation generator for Dart source code.
66
homepage: https://github.com/dart-lang/dartdoc
77
environment:
88
sdk: '>=2.6.0 <3.0.0'

test/package_meta_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ void main() {
4646
});
4747

4848
test('has a description', () {
49-
expect(p.description, equals('A documentation generator for Dart.'));
49+
expect(
50+
p.description,
51+
equals(
52+
'A non-interactive HTML documentation generator for Dart source code.'));
5053
});
5154

5255
test('has a homepage', () {

0 commit comments

Comments
 (0)