| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 self.dart_dir = os.path.dirname(os.path.dirname(os.path.dirname( | 163 self.dart_dir = os.path.dirname(os.path.dirname(os.path.dirname( |
| 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 logging.info("cwd '%s'" % os.getcwd()) |
| 174 |
| 173 # location of frogpad.js | 175 # location of frogpad.js |
| 174 if not options.frogpad_js: | 176 if not options.frogpad_js: |
| 175 raise Exception("--frogpad_js is required") | 177 raise Exception("--frogpad_js is required") |
| 176 | 178 |
| 177 if not os.path.exists(options.frogpad_js): | 179 if not os.path.exists(options.frogpad_js): |
| 178 raise FileNotFoundException(options.frogpad_js) | 180 raise FileNotFoundException(options.frogpad_js) |
| 179 | 181 |
| 180 self.frogpad_js = options.frogpad_js | 182 self.frogpad_js = options.frogpad_js |
| 181 | 183 |
| 182 if options.out: | 184 if options.out: |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 raise CommandFailedException(msg) | 355 raise CommandFailedException(msg) |
| 354 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) | 356 logging.debug("SUCCEEDED (%d bytes)" % len(stdout)) |
| 355 return stdout | 357 return stdout |
| 356 | 358 |
| 357 | 359 |
| 358 def main(argv): | 360 def main(argv): |
| 359 Pad(argv) | 361 Pad(argv) |
| 360 | 362 |
| 361 if __name__ == "__main__": | 363 if __name__ == "__main__": |
| 362 sys.exit(main(sys.argv)) | 364 sys.exit(main(sys.argv)) |
| OLD | NEW |