| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 import 'package:compiler/src/dart2js.dart' | 6 import 'package:compiler/src/dart2js.dart' |
| 7 as dart2js; | 7 as dart2js; |
| 8 import 'package:compiler/src/commandline_options.dart'; |
| 8 | 9 |
| 9 main() { | 10 main() { |
| 10 Uri currentDirectory = Uri.base; | 11 Uri currentDirectory = Uri.base; |
| 11 Uri script = currentDirectory.resolveUri(Platform.script); | 12 Uri script = currentDirectory.resolveUri(Platform.script); |
| 12 Uri libraryRoot = script.resolve('../../../sdk/'); | 13 Uri libraryRoot = script.resolve('../../../sdk/'); |
| 13 Directory.current = script.resolve("path with spaces").toFilePath(); | 14 Directory.current = script.resolve("path with spaces").toFilePath(); |
| 14 | 15 |
| 15 return dart2js.main(["--library-root=${libraryRoot.toFilePath()}", | 16 return dart2js.main(["--library-root=${libraryRoot.toFilePath()}", |
| 16 "--analyze-only", | 17 Flags.analyzeOnly, |
| 17 "file with spaces.dart"]); | 18 "file with spaces.dart"]); |
| 18 } | 19 } |
| OLD | NEW |