Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1691)

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 237863002: pkg/docgen: add --indent-json option (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// **docgen** is a tool for creating machine readable representations of Dart 5 /// **docgen** is a tool for creating machine readable representations of Dart
6 /// code metadata, including: classes, members, comments and annotations. 6 /// code metadata, including: classes, members, comments and annotations.
7 /// 7 ///
8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files.
9 /// 9 ///
10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR]
(...skipping 25 matching lines...) Expand all
36 /// If [serve] is `true`, then after generating the documents we fire up a 36 /// If [serve] is `true`, then after generating the documents we fire up a
37 /// simple server to view the documentation. 37 /// simple server to view the documentation.
38 /// 38 ///
39 /// Returned Future completes with true if document generation is successful. 39 /// Returned Future completes with true if document generation is successful.
40 Future<bool> docgen(List<String> files, {String packageRoot, 40 Future<bool> docgen(List<String> files, {String packageRoot,
41 bool includePrivate: false, bool includeSdk: false, bool parseSdk: false, 41 bool includePrivate: false, bool includeSdk: false, bool parseSdk: false,
42 String introFileName: '', String out: gen.DEFAULT_OUTPUT_DIRECTORY, 42 String introFileName: '', String out: gen.DEFAULT_OUTPUT_DIRECTORY,
43 List<String> excludeLibraries: const [], 43 List<String> excludeLibraries: const [],
44 bool includeDependentPackages: false, bool compile: false, 44 bool includeDependentPackages: false, bool compile: false,
45 bool serve: false, bool noDocs: false, String startPage, String pubScript, 45 bool serve: false, bool noDocs: false, String startPage, String pubScript,
46 String dartBinary}) { 46 String dartBinary, bool indentJSON: false}) {
47 var result; 47 var result;
48 if (!noDocs) { 48 if (!noDocs) {
49 viewer.ensureMovedViewerCode(); 49 viewer.ensureMovedViewerCode();
50 result = gen.generateDocumentation(files, packageRoot: packageRoot, 50 result = gen.generateDocumentation(files, packageRoot: packageRoot,
51 includePrivate: includePrivate, 51 includePrivate: includePrivate,
52 includeSdk: includeSdk, parseSdk: parseSdk, 52 includeSdk: includeSdk, parseSdk: parseSdk,
53 introFileName: introFileName, out: out, 53 introFileName: introFileName, out: out,
54 excludeLibraries: excludeLibraries, 54 excludeLibraries: excludeLibraries,
55 includeDependentPackages: includeDependentPackages, 55 includeDependentPackages: includeDependentPackages,
56 startPage: startPage, pubScript: pubScript, dartBinary: dartBinary); 56 startPage: startPage, pubScript: pubScript, dartBinary: dartBinary,
57 indentJSON: indentJSON);
57 viewer.addBackViewerCode(); 58 viewer.addBackViewerCode();
58 if (compile || serve) { 59 if (compile || serve) {
59 result.then((success) { 60 result.then((success) {
60 if (success) { 61 if (success) {
61 viewer.createViewer(serve); 62 viewer.createViewer(serve);
62 } 63 }
63 }); 64 });
64 } 65 }
65 } else if (compile || serve) { 66 } else if (compile || serve) {
66 viewer.createViewer(serve); 67 viewer.createViewer(serve);
67 } 68 }
68 return result; 69 return result;
69 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698