@@ -41,6 +41,7 @@ class HtmlGenerator extends Generator {
4141 final String _toolVersion;
4242 final String faviconPath;
4343 final bool useCategories;
44+ final bool prettyIndexJson;
4445
4546 final StreamController <File > _onFileCreated =
4647 new StreamController (sync : true );
@@ -56,7 +57,8 @@ class HtmlGenerator extends Generator {
5657 String relCanonicalPrefix,
5758 String toolVersion,
5859 String faviconPath,
59- bool useCategories: false }) async {
60+ bool useCategories: false ,
61+ bool prettyIndexJson: false }) async {
6062 var templates =
6163 await Templates .create (headerPaths: headers, footerPaths: footers);
6264
@@ -65,18 +67,22 @@ class HtmlGenerator extends Generator {
6567 }
6668
6769 return new HtmlGenerator ._(url, relCanonicalPrefix, templates, toolVersion,
68- faviconPath: faviconPath, useCategories: useCategories);
70+ faviconPath: faviconPath,
71+ useCategories: useCategories,
72+ prettyIndexJson: prettyIndexJson);
6973 }
7074
7175 HtmlGenerator ._(
7276 this ._url, this ._relCanonicalPrefix, this ._templates, this ._toolVersion,
73- {this .faviconPath, this .useCategories});
77+ {this .faviconPath, this .useCategories, this .prettyIndexJson : false });
7478
7579 @override
7680 Future generate (Package package, Directory out) {
7781 return new HtmlGeneratorInstance (_toolVersion, _url, _templates, package,
7882 out, _onFileCreated, _relCanonicalPrefix,
79- faviconPath: faviconPath, useCategories: useCategories)
83+ faviconPath: faviconPath,
84+ useCategories: useCategories,
85+ prettyIndexJson: prettyIndexJson)
8086 .generate ();
8187 }
8288}
0 commit comments