| OLD | NEW |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 String dartBinary, bool indentJSON: false}) { | 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, pubScriptValue: pubScript, |
| 57 indentJSON: indentJSON); | 57 dartBinaryValue: dartBinary, indentJSON: indentJSON); |
| 58 viewer.addBackViewerCode(); | 58 viewer.addBackViewerCode(); |
| 59 if (compile || serve) { | 59 if (compile || serve) { |
| 60 result.then((success) { | 60 result.then((success) { |
| 61 if (success) { | 61 if (success) { |
| 62 viewer.createViewer(serve); | 62 viewer.createViewer(serve); |
| 63 } | 63 } |
| 64 }); | 64 }); |
| 65 } | 65 } |
| 66 } else if (compile || serve) { | 66 } else if (compile || serve) { |
| 67 gen.pubScript = pubScript; |
| 68 gen.dartBinary = dartBinary; |
| 67 viewer.createViewer(serve); | 69 viewer.createViewer(serve); |
| 68 } | 70 } |
| 69 return result; | 71 return result; |
| 70 } | 72 } |
| OLD | NEW |