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

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

Issue 17759005: outputs a new file called library_list.txt which will let the viewer know what libraries are availa… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698