| 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 library dart2js.cmdline; | 5 library dart2js.cmdline; |
| 6 | 6 |
| 7 import 'dart:async' | 7 import 'dart:async' |
| 8 show Future, EventSink; | 8 show Future, EventSink; |
| 9 import 'dart:io' | 9 import 'dart:io' |
| 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException, | 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException, |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 uri = out; | 411 uri = out; |
| 412 sourceMapFileName = | 412 sourceMapFileName = |
| 413 sourceMapOut.path.substring(sourceMapOut.path.lastIndexOf('/') + 1); | 413 sourceMapOut.path.substring(sourceMapOut.path.lastIndexOf('/') + 1); |
| 414 } else if (extension == 'precompiled.js') { | 414 } else if (extension == 'precompiled.js') { |
| 415 uri = computePrecompiledUri(); | 415 uri = computePrecompiledUri(); |
| 416 diagnosticHandler.info( | 416 diagnosticHandler.info( |
| 417 "File ($uri) is compatible with header" | 417 "File ($uri) is compatible with header" |
| 418 " \"Content-Security-Policy: script-src 'self'\""); | 418 " \"Content-Security-Policy: script-src 'self'\""); |
| 419 } else if (extension == 'js.map' || extension == 'dart.map') { | 419 } else if (extension == 'js.map' || extension == 'dart.map') { |
| 420 uri = sourceMapOut; | 420 uri = sourceMapOut; |
| 421 } else if (extension == 'info.html') { | 421 } else if (extension == 'info.html' || extension == "info.json") { |
| 422 String outName = out.path.substring(out.path.lastIndexOf('/') + 1); | 422 String outName = out.path.substring(out.path.lastIndexOf('/') + 1); |
| 423 uri = out.resolve('${outName}.$extension'); | 423 uri = out.resolve('$outName.$extension'); |
| 424 } else { | 424 } else { |
| 425 fail('Unknown extension: $extension'); | 425 fail('Unknown extension: $extension'); |
| 426 } | 426 } |
| 427 } else { | 427 } else { |
| 428 uri = out.resolve('$name.$extension'); | 428 uri = out.resolve('$name.$extension'); |
| 429 } | 429 } |
| 430 | 430 |
| 431 if (uri.scheme != 'file') { | 431 if (uri.scheme != 'file') { |
| 432 fail('Unhandled scheme ${uri.scheme} in $uri.'); | 432 fail('Unhandled scheme ${uri.scheme} in $uri.'); |
| 433 } | 433 } |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 } else { | 725 } else { |
| 726 print(">>> TEST FAIL"); | 726 print(">>> TEST FAIL"); |
| 727 } | 727 } |
| 728 stderr.writeln(">>> EOF STDERR"); | 728 stderr.writeln(">>> EOF STDERR"); |
| 729 runJob(); | 729 runJob(); |
| 730 }); | 730 }); |
| 731 } | 731 } |
| 732 | 732 |
| 733 runJob(); | 733 runJob(); |
| 734 } | 734 } |
| OLD | NEW |