OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:analyzer/analyzer.dart' | 9 import 'package:analyzer/analyzer.dart' |
10 show | 10 show |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 var packageRoot = options['package-root'] as String; | 46 var packageRoot = options['package-root'] as String; |
47 var unsafe = options['unsafe-force-compile'] as bool; | 47 var unsafe = options['unsafe-force-compile'] as bool; |
48 var log = options['log'] as bool; | 48 var log = options['log'] as bool; |
49 var tmp = options['tmp'] as String; | 49 var tmp = options['tmp'] as String; |
50 | 50 |
51 // Build an invocation to dartdevc | 51 // Build an invocation to dartdevc |
52 var dartPath = Platform.resolvedExecutable; | 52 var dartPath = Platform.resolvedExecutable; |
53 var ddcPath = path.dirname(path.dirname(Platform.script.toFilePath())); | 53 var ddcPath = path.dirname(path.dirname(Platform.script.toFilePath())); |
54 var template = [ | 54 var template = [ |
55 '$ddcPath/bin/dartdevc.dart', | 55 '$ddcPath/bin/dartdevc.dart', |
56 'compile', | |
57 '--no-source-map', // Invalid as we're just concatenating files below | 56 '--no-source-map', // Invalid as we're just concatenating files below |
58 '-p', | 57 '-p', |
59 packageRoot | 58 packageRoot |
60 ]; | 59 ]; |
61 if (unsafe) { | 60 if (unsafe) { |
62 template.add('--unsafe-force-compile'); | 61 template.add('--unsafe-force-compile'); |
63 } | 62 } |
64 | 63 |
65 // Compute the transitive closure | 64 // Compute the transitive closure |
66 var total = new Stopwatch()..start(); | 65 var total = new Stopwatch()..start(); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 var uri = _resolveDirective(d); | 271 var uri = _resolveDirective(d); |
273 processDependence(entryPoint, canonicalize(uri, entryDir)); | 272 processDependence(entryPoint, canonicalize(uri, entryDir)); |
274 transitiveFiles(uri, entryDir, packageRoot); | 273 transitiveFiles(uri, entryDir, packageRoot); |
275 } else if (d is PartDirective) { | 274 } else if (d is PartDirective) { |
276 var uri = _resolveDirective(d); | 275 var uri = _resolveDirective(d); |
277 processFile(canonicalize(uri, entryDir)); | 276 processFile(canonicalize(uri, entryDir)); |
278 } | 277 } |
279 } | 278 } |
280 } | 279 } |
281 } | 280 } |
OLD | NEW |