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 /// A straightforward script that builds the SDK. | 6 /// A straightforward script that builds the SDK. |
7 /// | 7 /// |
8 /// This would be easy enough to do in a shell script, as we go through the | 8 /// This would be easy enough to do in a shell script, as we go through the |
9 /// command line interface. But being able to build from a Dart library means | 9 /// command line interface. But being able to build from a Dart library means |
10 /// we can call this during code coverage to get more realistic numbers. | 10 /// we can call this during code coverage to get more realistic numbers. |
11 | 11 |
12 import 'package:args/command_runner.dart' show CommandRunner; | |
13 import 'package:dev_compiler/src/compiler/command.dart'; | 12 import 'package:dev_compiler/src/compiler/command.dart'; |
14 | 13 |
15 main(List<String> arguments) { | 14 main(List<String> arguments) { |
16 var args = [ | 15 var args = [ |
17 'compile', | |
18 '--unsafe-force-compile', | 16 '--unsafe-force-compile', |
19 '--no-source-map', | 17 '--no-source-map', |
20 '--no-emit-metadata' | 18 '--no-emit-metadata' |
21 ]; | 19 ]; |
22 args.addAll(arguments); | 20 args.addAll(arguments); |
23 args.addAll([ | 21 args.addAll([ |
24 'dart:_runtime', | 22 'dart:_runtime', |
25 'dart:_debugger', | 23 'dart:_debugger', |
26 'dart:_foreign_helper', | 24 'dart:_foreign_helper', |
27 'dart:_interceptors', | 25 'dart:_interceptors', |
(...skipping 15 matching lines...) Expand all Loading... |
43 'dart:mirrors', | 41 'dart:mirrors', |
44 'dart:typed_data', | 42 'dart:typed_data', |
45 'dart:indexed_db', | 43 'dart:indexed_db', |
46 'dart:html', | 44 'dart:html', |
47 'dart:html_common', | 45 'dart:html_common', |
48 'dart:svg', | 46 'dart:svg', |
49 'dart:web_audio', | 47 'dart:web_audio', |
50 'dart:web_gl', | 48 'dart:web_gl', |
51 'dart:web_sql' | 49 'dart:web_sql' |
52 ]); | 50 ]); |
53 var runner = new CommandRunner('dartdevc', 'Dart Development Compiler'); | 51 new CompileCommand().run(args); |
54 runner.addCommand(new CompileCommand()); | |
55 return runner.run(args); | |
56 } | 52 } |
OLD | NEW |