| 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 * To generate docs for a library, run this script with the path to an | 6 * To generate docs for a library, run this script with the path to an |
| 7 * entrypoint .dart file, like: | 7 * entrypoint .dart file, like: |
| 8 * | 8 * |
| 9 * $ dart dartdoc.dart foo.dart | 9 * $ dart dartdoc.dart foo.dart |
| 10 * | 10 * |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 parseOptions(frogPath, ['', '', '--libdir=$libDir'], files); | 112 parseOptions(frogPath, ['', '', '--libdir=$libDir'], files); |
| 113 initializeWorld(files); | 113 initializeWorld(files); |
| 114 | 114 |
| 115 final dartdoc = new Dartdoc(); | 115 final dartdoc = new Dartdoc(); |
| 116 | 116 |
| 117 if (includeSource != null) dartdoc.includeSource = includeSource; | 117 if (includeSource != null) dartdoc.includeSource = includeSource; |
| 118 if (mode != null) dartdoc.mode = mode; | 118 if (mode != null) dartdoc.mode = mode; |
| 119 if (outputDir != null) dartdoc.outputDir = outputDir; | 119 if (outputDir != null) dartdoc.outputDir = outputDir; |
| 120 if (generateAppCache != null) dartdoc.generateAppCache = generateAppCache; | 120 if (generateAppCache != null) dartdoc.generateAppCache = generateAppCache; |
| 121 if (omitGenerationTime != null) dartdoc.omitGenerationTime = omitGenerationTim
e; | 121 if (omitGenerationTime != null) { |
| 122 dartdoc.omitGenerationTime = omitGenerationTime; |
| 123 } |
| 122 | 124 |
| 123 cleanOutputDirectory(dartdoc.outputDir); | 125 cleanOutputDirectory(dartdoc.outputDir); |
| 124 | 126 |
| 125 // Compile the client-side code to JS. | 127 // Compile the client-side code to JS. |
| 126 final clientScript = (dartdoc.mode == MODE_STATIC) ? 'static' : 'live-nav'; | 128 final clientScript = (dartdoc.mode == MODE_STATIC) ? 'static' : 'live-nav'; |
| 127 final Future scriptCompiled = compileScript(compilerPath, | 129 final Future scriptCompiled = compileScript(compilerPath, |
| 128 '$scriptDir/client-$clientScript.dart', | 130 '$scriptDir/client-$clientScript.dart', |
| 129 '${dartdoc.outputDir}/client-$clientScript.js'); | 131 '${dartdoc.outputDir}/client-$clientScript.js'); |
| 130 | 132 |
| 131 final Future filesCopied = copyFiles('$scriptDir/static', dartdoc.outputDir); | 133 final Future filesCopied = copyFiles('$scriptDir/static', dartdoc.outputDir); |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 if (filename.endsWith('appcache.manifest')) { | 1372 if (filename.endsWith('appcache.manifest')) { |
| 1371 return; | 1373 return; |
| 1372 } | 1374 } |
| 1373 var relativePath = filename.substring(pathPrefixLength + 1); | 1375 var relativePath = filename.substring(pathPrefixLength + 1); |
| 1374 write("$relativePath\n"); | 1376 write("$relativePath\n"); |
| 1375 }; | 1377 }; |
| 1376 toCache.onDone = (done) => endFile(); | 1378 toCache.onDone = (done) => endFile(); |
| 1377 toCache.list(recursive: true); | 1379 toCache.list(recursive: true); |
| 1378 } | 1380 } |
| 1379 } | 1381 } |
| OLD | NEW |