| 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 /** | 5 /** |
| 6 * **docgen** is a tool for creating machine readable representations of Dart | 6 * **docgen** is a tool for creating machine readable representations of Dart |
| 7 * code metadata, including: classes, members, comments and annotations. | 7 * code metadata, including: classes, members, comments and annotations. |
| 8 * | 8 * |
| 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. | 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. |
| 10 * | 10 * |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 _getVariables(library.variables), _getMethods(library.functions), | 186 _getVariables(library.variables), _getMethods(library.functions), |
| 187 _getClasses(library.classes)); | 187 _getClasses(library.classes)); |
| 188 if (outputToJson) { | 188 if (outputToJson) { |
| 189 _writeToFile(stringify(result.toMap()), '${result.name}.json'); | 189 _writeToFile(stringify(result.toMap()), '${result.name}.json'); |
| 190 } | 190 } |
| 191 if (outputToYaml) { | 191 if (outputToYaml) { |
| 192 _writeToFile(getYamlString(result.toMap()), '${result.name}.yaml'); | 192 _writeToFile(getYamlString(result.toMap()), '${result.name}.yaml'); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 }); | 195 }); |
| 196 _writeToFile(listDir("docs").join('\n'), 'library_list.txt'); |
| 196 } | 197 } |
| 197 | 198 |
| 198 /// Saves list of libraries for Docgen object. | 199 /// Saves list of libraries for Docgen object. |
| 199 void set libraries(value){ | 200 void set libraries(value){ |
| 200 _libraries = value; | 201 _libraries = value; |
| 201 } | 202 } |
| 202 | 203 |
| 203 /** | 204 /** |
| 204 * Returns any documentation comments associated with a mirror with | 205 * Returns any documentation comments associated with a mirror with |
| 205 * simple markdown converted to html. | 206 * simple markdown converted to html. |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 if (!dir.existsSync()) { | 500 if (!dir.existsSync()) { |
| 500 dir.createSync(); | 501 dir.createSync(); |
| 501 } | 502 } |
| 502 File file = new File('docs/$filename'); | 503 File file = new File('docs/$filename'); |
| 503 if (!file.existsSync()) { | 504 if (!file.existsSync()) { |
| 504 file.createSync(); | 505 file.createSync(); |
| 505 } | 506 } |
| 506 file.openSync(); | 507 file.openSync(); |
| 507 file.writeAsString(text); | 508 file.writeAsString(text); |
| 508 } | 509 } |
| OLD | NEW |