Skip to content

Commit 88e14f9

Browse files
committed
major refactoring, also include version in html comments
Closes #796 Squashed commit of the following: commit 365bfb0 Merge: c4c59ae 3ab24d8 Author: Seth Ladd <[email protected]> Date: Fri Aug 7 17:11:17 2015 -0700 Merge branch 'master' of github.com:dart-lang/dartdoc into sl-version-in-comments commit c4c59ae Author: Seth Ladd <[email protected]> Date: Fri Aug 7 16:58:11 2015 -0700 major refactoring, also include version in html comments commit f629d9a Author: Seth Ladd <[email protected]> Date: Fri Aug 7 15:05:58 2015 -0700 add missing fields commit 32b1817 Author: Seth Ladd <[email protected]> Date: Fri Aug 7 15:02:33 2015 -0700 refactor html generator
1 parent 3ab24d8 commit 88e14f9

File tree

6 files changed

+487
-386
lines changed

6 files changed

+487
-386
lines changed

lib/dartdoc.dart

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:analyzer/src/generated/source_io.dart';
1919

2020
import 'generator.dart';
2121
import 'resource_loader.dart' as loader;
22-
import 'src/html_generator.dart';
22+
import 'src/html_generator.dart' show dartdocVersion, HtmlGenerator;
2323
import 'src/io_utils.dart';
2424
import 'src/model.dart';
2525
import 'src/model_utils.dart';
@@ -37,6 +37,7 @@ final String defaultOutDir = 'doc${Platform.pathSeparator}api';
3737
/// Initialize and setup the generators.
3838
List<Generator> initGenerators(
3939
String url, String headerFilePath, String footerFilePath) {
40+
dartdocVersion = version;
4041
return [
4142
new HtmlGenerator(url, header: headerFilePath, footer: footerFilePath)
4243
];
@@ -57,8 +58,15 @@ class DartDoc {
5758

5859
Stopwatch _stopwatch;
5960

60-
DartDoc(this.rootDir, this.excludes, this.sdkDir, this.generators,
61-
this.outputDir, this.packageRootDir, this.packageMeta, this.urlMappings,
61+
DartDoc(
62+
this.rootDir,
63+
this.excludes,
64+
this.sdkDir,
65+
this.generators,
66+
this.outputDir,
67+
this.packageRootDir,
68+
this.packageMeta,
69+
this.urlMappings,
6270
this.includes);
6371

6472
/// Generate DartDoc documentation.
@@ -178,8 +186,8 @@ class DartDoc {
178186
}).where((_Error error) => error.isError).toList()..sort();
179187

180188
double seconds = _stopwatch.elapsedMilliseconds / 1000.0;
181-
print(
182-
"Parsed ${libraries.length} " "file${libraries.length == 1 ? '' : 's'} in "
189+
print("Parsed ${libraries.length} "
190+
"file${libraries.length == 1 ? '' : 's'} in "
183191
"${seconds.toStringAsFixed(1)} seconds.\n");
184192

185193
if (errors.isNotEmpty) {

0 commit comments

Comments
 (0)