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

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

Issue 18999006: Added a uploadsdk python script. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 /** 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 libraries.forEach((lib) { 208 libraries.forEach((lib) {
209 // Files belonging to the SDK have a uri that begins with 'dart:'. 209 // Files belonging to the SDK have a uri that begins with 'dart:'.
210 if (includeSdk || !lib.uri.toString().startsWith('dart:')) { 210 if (includeSdk || !lib.uri.toString().startsWith('dart:')) {
211 var library = generateLibrary(lib, includePrivate: includePrivate); 211 var library = generateLibrary(lib, includePrivate: includePrivate);
212 _writeLibraryToFile(library, outputToYaml); 212 _writeLibraryToFile(library, outputToYaml);
213 } 213 }
214 }); 214 });
215 // Outputs a text file with a list of files available after creating all 215 // Outputs a text file with a list of files available after creating all
216 // the libraries. This will help the viewer know what files are available 216 // the libraries. This will help the viewer know what files are available
217 // to read in. 217 // to read in.
218 _writeToFile(listDir("docs").join('\n'), 'library_list.txt'); 218 _writeToFile(listDir('docs').join('\n').replaceAll('docs/', ''),
219 'library_list.txt');
219 } 220 }
220 221
221 Library generateLibrary(dart2js.Dart2JsLibraryMirror library, 222 Library generateLibrary(dart2js.Dart2JsLibraryMirror library,
222 {bool includePrivate:false}) { 223 {bool includePrivate:false}) {
223 _currentLibrary = library; 224 _currentLibrary = library;
224 var result = new Library(library.qualifiedName, _getComment(library), 225 var result = new Library(library.qualifiedName, _getComment(library),
225 _getVariables(library.variables, includePrivate), 226 _getVariables(library.variables, includePrivate),
226 _getMethods(library.functions, includePrivate), 227 _getMethods(library.functions, includePrivate),
227 _getClasses(library.classes, includePrivate)); 228 _getClasses(library.classes, includePrivate));
228 logger.fine('Generated library for ${result.name}'); 229 logger.fine('Generated library for ${result.name}');
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 parameterMap['qualifiedname'] = qualifiedName; 578 parameterMap['qualifiedname'] = qualifiedName;
578 parameterMap['optional'] = isOptional.toString(); 579 parameterMap['optional'] = isOptional.toString();
579 parameterMap['named'] = isNamed.toString(); 580 parameterMap['named'] = isNamed.toString();
580 parameterMap['default'] = hasDefaultValue.toString(); 581 parameterMap['default'] = hasDefaultValue.toString();
581 parameterMap['type'] = type; 582 parameterMap['type'] = type;
582 parameterMap['value'] = defaultValue; 583 parameterMap['value'] = defaultValue;
583 parameterMap['annotations'] = new List.from(annotations); 584 parameterMap['annotations'] = new List.from(annotations);
584 return parameterMap; 585 return parameterMap;
585 } 586 }
586 } 587 }
OLDNEW
« pkg/docgen/bin/upload_docgen.py ('K') | « pkg/docgen/bin/upload_docgen.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698