| Index: pkg/analysis_server/tool/spec/to_html.dart
|
| diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
|
| index a1d53222c64e0b6a82cf120ad11b486e92eb71ee..6a3c251a1a5b4fc1d058d30ecd082c7c3eda2f8c 100644
|
| --- a/pkg/analysis_server/tool/spec/to_html.dart
|
| +++ b/pkg/analysis_server/tool/spec/to_html.dart
|
| @@ -10,7 +10,6 @@
|
| library to.html;
|
|
|
| import 'dart:convert';
|
| -import 'dart:io';
|
|
|
| import 'package:html5lib/dom.dart' as dom;
|
|
|
| @@ -529,15 +528,18 @@ class ToHtmlVisitor extends HierarchicalApiVisitor with HtmlMixin, HtmlGenerator
|
| }
|
| }
|
|
|
| -/**
|
| - * Translate spec_input.html into api.html.
|
| - */
|
| -main() {
|
| +final GeneratedFile target = new GeneratedFile('../../doc/api.html', () {
|
| ToHtmlVisitor visitor = new ToHtmlVisitor(readApi());
|
| dom.Document document = new dom.Document();
|
| for (dom.Node node in visitor.collectHtml(visitor.visitApi)) {
|
| document.append(node);
|
| }
|
| - File outputFile = new File('../../doc/api.html');
|
| - outputFile.writeAsStringSync(document.outerHtml);
|
| + return document.outerHtml;
|
| +});
|
| +
|
| +/**
|
| + * Translate spec_input.html into api.html.
|
| + */
|
| +main() {
|
| + target.generate();
|
| }
|
|
|