| 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 * A library for extracting the documentation from the various HTML libraries | 6 * A library for extracting the documentation from the various HTML libraries |
| 7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving | 7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving |
| 8 * those documentation comments to a JSON file. | 8 * those documentation comments to a JSON file. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 * ... | 43 * ... |
| 44 * ], | 44 * ], |
| 45 * ... | 45 * ... |
| 46 * } | 46 * } |
| 47 * }, | 47 * }, |
| 48 * ... | 48 * ... |
| 49 * }, | 49 * }, |
| 50 * ... | 50 * ... |
| 51 * } | 51 * } |
| 52 * | 52 * |
| 53 * Completes to `true` if any errors were encountered, `false` otherwise. | 53 * Completes to true if any errors were encountered, false otherwise. |
| 54 */ | 54 */ |
| 55 Future<bool> convert(String libUri, String jsonPath) { | 55 Future<bool> convert(String libUri, String jsonPath) { |
| 56 var paths = <String>[]; | 56 var paths = <String>[]; |
| 57 for (var libraryName in HTML_LIBRARY_NAMES) { | 57 for (var libraryName in HTML_LIBRARY_NAMES) { |
| 58 paths.add(libraryName); | 58 paths.add(libraryName); |
| 59 } | 59 } |
| 60 | 60 |
| 61 return analyze(paths, libUri, options: ['--preserve-comments']) | 61 return analyze(paths, libUri, options: ['--preserve-comments']) |
| 62 .then((MirrorSystem mirrors) { | 62 .then((MirrorSystem mirrors) { |
| 63 var convertedJson = _generateJsonFromLibraries(mirrors); | 63 var convertedJson = _generateJsonFromLibraries(mirrors); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 for (var s in tags.reflectee.split(',')) { | 186 for (var s in tags.reflectee.split(',')) { |
| 187 domNames.add(s.trim()); | 187 domNames.add(s.trim()); |
| 188 } | 188 } |
| 189 | 189 |
| 190 if (domNames.length == 1 && domNames[0] == 'none') return <String>[]; | 190 if (domNames.length == 1 && domNames[0] == 'none') return <String>[]; |
| 191 return domNames; | 191 return domNames; |
| 192 } else { | 192 } else { |
| 193 return <String>[]; | 193 return <String>[]; |
| 194 } | 194 } |
| 195 } | 195 } |
| OLD | NEW |