-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
92 lines (72 loc) · 2.92 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Dartdoc generates static HTML documentation from Dart code.
To use it, from this directory, run:
$ dartdoc [options] <path to .dart file>
Options are:
--no-code code snippets are not included with the documentation
--no-search disable search functionality
--mode=static render the navigation in HTML
This will create a "docs" directory with the docs for your libraries.
By default documents are rendered with dynamic generated navigation,
code snippets included and search functionality enabled.
How docs are generated
----------------------
To make beautiful docs from your library, dartdoc parses it and every library it
imports (recursively). From each library, it parses all classes and members,
finds the associated doc comments and builds crosslinked docs from them.
"Doc comments" can be in one of a few forms:
/**
* JavaDoc style block comments.
*/
/** Which can also be single line. */
/// Triple-slash line comments.
/// Which can be multiple lines.
The body of a doc comment will be parsed as markdown which means you can apply
most of the formatting and structuring you want while still having docs that
look nice in plain text. For example:
/// This is a doc comment. This is the first paragraph in the comment. It
/// can span multiple lines.
///
/// A blank line starts a new paragraph like this one.
///
/// * Unordered lists start with `*` or `-` or `+`.
/// * And can have multiple items.
/// 1. You can nest lists.
/// 2. Like this numbered one.
///
/// ---
///
/// Three dashes, underscores, or tildes on a line by themselves create a
/// horizontal rule.
///
/// to.get(a.block + of.code) {
/// indent(it, 4.spaces);
/// like(this);
/// }
///
/// There are a few inline styles you can apply: *emphasis*, **strong**,
/// and `inline code`. You can also use underscores for _emphasis_ and
/// __strong__.
///
/// An H1 header using equals on the next line
/// ==========================================
///
/// And an H2 in that style using hyphens
/// -------------------------------------
///
/// # Or an H1 - H6 using leading hashes
/// ## H2
/// ### H3
/// #### H4 you can also have hashes at then end: ###
/// ##### H5
/// ###### H6
There is also an extension to markdown specific to dartdoc: A name inside
square brackets that is not a markdown link (i.e. doesn't have square brackets
or parentheses following it) like:
Calls [someMethod], passing in [arg].
is understood to be the name of some member or type that's in the scope of the
member where that comment appears. Dartdoc will automatically figure out what
the name refers to and generate an approriate link to that member or type.
Attribution
-----------
dartdoc uses the delightful Silk icon set by Mark James.
http://www.famfamfam.com/lab/icons/silk/