| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, 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 | 7 |
| 8 """ | 8 """ |
| 9 Frogpad is used to compile .dart files to javascript. | 9 Frogpad is used to compile .dart files to javascript. |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 self.frogpad_dir))) | 164 self.frogpad_dir))) |
| 165 | 165 |
| 166 # directory of frog compiler source code | 166 # directory of frog compiler source code |
| 167 self.frog_dir = os.path.join(self.dart_dir, "frog") | 167 self.frog_dir = os.path.join(self.dart_dir, "frog") |
| 168 | 168 |
| 169 logging.debug("dartdir_dir: '%s'" % self.dart_dir) | 169 logging.debug("dartdir_dir: '%s'" % self.dart_dir) |
| 170 logging.debug("frog_dir: '%s'" % self.frog_dir) | 170 logging.debug("frog_dir: '%s'" % self.frog_dir) |
| 171 logging.debug("frogpad_dir: '%s'" % self.frogpad_dir) | 171 logging.debug("frogpad_dir: '%s'" % self.frogpad_dir) |
| 172 | 172 |
| 173 # location of frogpad.js | 173 # location of frogpad.js |
| 174 # (frogpad.js is generated by running frogsh_bootstrap_wrapper.py) | |
| 175 if not options.frogpad_js: | 174 if not options.frogpad_js: |
| 176 raise Exception("--frogpad_js is required") | 175 raise Exception("--frogpad_js is required") |
| 177 | 176 |
| 178 if not os.path.exists(options.frogpad_js): | 177 if not os.path.exists(options.frogpad_js): |
| 179 raise FileNotFoundException(options.frogpad_js) | 178 raise FileNotFoundException(options.frogpad_js) |
| 180 | 179 |
| 181 self.frogpad_js = options.frogpad_js | 180 self.frogpad_js = options.frogpad_js |
| 182 | 181 |
| 183 if options.out: | 182 if options.out: |
| 184 # user has specified an output file name | 183 # user has specified an output file name |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 raise CommandFailedException(msg) | 353 raise CommandFailedException(msg) |
| 355 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) | 354 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) |
| 356 return stdout | 355 return stdout |
| 357 | 356 |
| 358 | 357 |
| 359 def main(argv): | 358 def main(argv): |
| 360 Pad(argv) | 359 Pad(argv) |
| 361 | 360 |
| 362 if __name__ == "__main__": | 361 if __name__ == "__main__": |
| 363 sys.exit(main(sys.argv)) | 362 sys.exit(main(sys.argv)) |
| OLD | NEW |