| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 # A script which makes it easy to execute common DOM-related tasks | 7 # A script which makes it easy to execute common DOM-related tasks |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 import subprocess | 10 import subprocess |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 def analyze(): | 35 def analyze(): |
| 36 ''' Runs the dart analyzer. ''' | 36 ''' Runs the dart analyzer. ''' |
| 37 call([ | 37 call([ |
| 38 os.path.join(dart_out_dir, 'dart-sdk', 'bin', 'dart_analyzer'), | 38 os.path.join(dart_out_dir, 'dart-sdk', 'bin', 'dart_analyzer'), |
| 39 os.path.join('tests', 'html', 'element_test.dart'), | 39 os.path.join('tests', 'html', 'element_test.dart'), |
| 40 '--dart-sdk', 'sdk', | 40 '--dart-sdk', 'sdk', |
| 41 '--show-sdk-warnings', | 41 '--show-sdk-warnings', |
| 42 ]) | 42 ]) |
| 43 | 43 |
| 44 def build(): | 44 def build(): |
| 45 ''' Builds the SDK ''' | 45 ''' Builds the Dart binary ''' |
| 46 call([ | 46 call([ |
| 47 os.path.join('tools', 'build.py'), | 47 os.path.join('tools', 'build.py'), |
| 48 '--mode=release', | 48 '--mode=release', |
| 49 '--arch=ia32', | 49 '--arch=ia32', |
| 50 'runtime', |
| 50 ]) | 51 ]) |
| 51 | 52 |
| 52 def dart2js(): | 53 def dart2js(): |
| 53 compile_dart2js(argv.pop(0), True) | 54 compile_dart2js(argv.pop(0), True) |
| 54 | 55 |
| 55 def dartc(): | 56 def dartc(): |
| 56 call([ | 57 call([ |
| 57 os.path.join('tools', 'test.py'), | 58 os.path.join('tools', 'test.py'), |
| 58 '-m', | 59 '-m', |
| 59 'release', | 60 'release', |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 init_dir() | 179 init_dir() |
| 179 command = argv.pop(0) | 180 command = argv.pop(0) |
| 180 | 181 |
| 181 if not command in commands: | 182 if not command in commands: |
| 182 help(); | 183 help(); |
| 183 return | 184 return |
| 184 commands[command][0]() | 185 commands[command][0]() |
| 185 | 186 |
| 186 if __name__ == '__main__': | 187 if __name__ == '__main__': |
| 187 main(sys.argv) | 188 main(sys.argv) |
| OLD | NEW |