| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 * This generates the reference documentation for the core libraries that come | 6 * This generates the reference documentation for the core libraries that come |
| 7 * with dart. It is built on top of dartdoc, which is a general-purpose library | 7 * with dart. It is built on top of dartdoc, which is a general-purpose library |
| 8 * for generating docs from any Dart code. This library extends that to include | 8 * for generating docs from any Dart code. This library extends that to include |
| 9 * additional information and styling specific to our standard library. | 9 * additional information and styling specific to our standard library. |
| 10 * | 10 * |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 print('Unknown option: $arg'); | 62 print('Unknown option: $arg'); |
| 63 return; | 63 return; |
| 64 } | 64 } |
| 65 break; | 65 break; |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 final frogPath = joinPaths(doc.scriptDir, '../../lib/dartdoc/frog/'); | 69 final frogPath = joinPaths(doc.scriptDir, '../../lib/dartdoc/frog/'); |
| 70 | 70 |
| 71 if (compilerPath === null) { | 71 if (compilerPath === null) { |
| 72 compilerPath = 'dart2js'; | 72 compilerPath |
| 73 = Platform.operatingSystem == 'windows' ? 'dart2js.bat' : 'dart2js'; |
| 73 } | 74 } |
| 74 | 75 |
| 75 doc.cleanOutputDirectory(outputDir); | 76 doc.cleanOutputDirectory(outputDir); |
| 76 | 77 |
| 77 // Compile the client-side code to JS. | 78 // Compile the client-side code to JS. |
| 78 // TODO(bob): Right path. | 79 // TODO(bob): Right path. |
| 79 | 80 |
| 80 final clientScript = (mode == doc.MODE_STATIC) ? | 81 final clientScript = (mode == doc.MODE_STATIC) ? |
| 81 'static' : 'live-nav'; | 82 'static' : 'live-nav'; |
| 82 final Future scriptCompiled = doc.compileScript(compilerPath, | 83 final Future scriptCompiled = doc.compileScript(compilerPath, |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 if (member.isConstructor || member.isFactory) { | 549 if (member.isConstructor || member.isFactory) { |
| 549 final separator = member.constructorName == '' ? '' : '.'; | 550 final separator = member.constructorName == '' ? '' : '.'; |
| 550 memberName = 'new $typeName$separator${member.constructorName}'; | 551 memberName = 'new $typeName$separator${member.constructorName}'; |
| 551 } else if (member.name.startsWith(GET_PREFIX)) { | 552 } else if (member.name.startsWith(GET_PREFIX)) { |
| 552 memberName = '$typeName.${member.name.substring(GET_PREFIX.length)}'; | 553 memberName = '$typeName.${member.name.substring(GET_PREFIX.length)}'; |
| 553 } | 554 } |
| 554 | 555 |
| 555 return a(memberUrl(member), memberName); | 556 return a(memberUrl(member), memberName); |
| 556 } | 557 } |
| 557 } | 558 } |
| OLD | NEW |