| 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) |
| 174 if not options.frogpad_js: | 175 if not options.frogpad_js: |
| 175 raise Exception("--frogpad_js is required") | 176 raise Exception("--frogpad_js is required") |
| 176 | 177 |
| 177 if not os.path.exists(options.frogpad_js): | 178 if not os.path.exists(options.frogpad_js): |
| 178 raise FileNotFoundException(options.frogpad_js) | 179 raise FileNotFoundException(options.frogpad_js) |
| 179 | 180 |
| 180 self.frogpad_js = options.frogpad_js | 181 self.frogpad_js = options.frogpad_js |
| 181 | 182 |
| 182 if options.out: | 183 if options.out: |
| 183 # user has specified an output file name | 184 # user has specified an output file name |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 raise CommandFailedException(msg) | 354 raise CommandFailedException(msg) |
| 354 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) | 355 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) |
| 355 return stdout | 356 return stdout |
| 356 | 357 |
| 357 | 358 |
| 358 def main(argv): | 359 def main(argv): |
| 359 Pad(argv) | 360 Pad(argv) |
| 360 | 361 |
| 361 if __name__ == "__main__": | 362 if __name__ == "__main__": |
| 362 sys.exit(main(sys.argv)) | 363 sys.exit(main(sys.argv)) |
| OLD | NEW |