| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 '''Produces various output formats from a set of JavaScript files with | 7 '''Produces various output formats from a set of JavaScript files with |
| 8 closure style require/provide calls. | 8 closure style require/provide calls. |
| 9 | 9 |
| 10 Scans one or more directory trees for JavaScript files. Then, from a | 10 Scans one or more directory trees for JavaScript files. Then, from a |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 import optparse | 34 import optparse |
| 35 import os | 35 import os |
| 36 import re | 36 import re |
| 37 import shutil | 37 import shutil |
| 38 import sys | 38 import sys |
| 39 | 39 |
| 40 _SCRIPT_DIR = os.path.realpath(os.path.dirname(__file__)) | 40 _SCRIPT_DIR = os.path.realpath(os.path.dirname(__file__)) |
| 41 _CHROME_SOURCE = os.path.realpath( | 41 _CHROME_SOURCE = os.path.realpath( |
| 42 os.path.join(_SCRIPT_DIR, *[os.path.pardir] * 6)) | 42 os.path.join(_SCRIPT_DIR, *[os.path.pardir] * 6)) |
| 43 sys.path.insert(0, os.path.join( | 43 sys.path.insert(0, os.path.join( |
| 44 _CHROME_SOURCE, 'third_party/WebKit/Source/devtools/scripts')) | 44 _CHROME_SOURCE, 'third_party/WebKit/Source/devtools/scripts/build')) |
| 45 sys.path.insert(0, os.path.join( | 45 sys.path.insert(0, os.path.join( |
| 46 _CHROME_SOURCE, ('chrome/third_party/chromevox/third_party/' + | 46 _CHROME_SOURCE, ('chrome/third_party/chromevox/third_party/' + |
| 47 'closure-library/closure/bin/build'))) | 47 'closure-library/closure/bin/build'))) |
| 48 import depstree | 48 import depstree |
| 49 import rjsmin | 49 import rjsmin |
| 50 import source | 50 import source |
| 51 import treescan | 51 import treescan |
| 52 | 52 |
| 53 | 53 |
| 54 def Die(message): | 54 def Die(message): |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 finally: | 373 finally: |
| 374 if options.output_file: | 374 if options.output_file: |
| 375 out_file.close() | 375 out_file.close() |
| 376 if options.stampfile: | 376 if options.stampfile: |
| 377 WriteStampfile(options.stampfile) | 377 WriteStampfile(options.stampfile) |
| 378 if options.depfile: | 378 if options.depfile: |
| 379 WriteDepfile(options.depfile, options.output_file, bundle.GetInPaths()) | 379 WriteDepfile(options.depfile, options.output_file, bundle.GetInPaths()) |
| 380 | 380 |
| 381 if __name__ == '__main__': | 381 if __name__ == '__main__': |
| 382 main() | 382 main() |
| OLD | NEW |