| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 Google Inc. All rights reserved. | 2 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc-validator'
, 'jsdoc-validator.jar')) | 239 jsdoc_validator_jar = to_platform_path(path.join(scripts_path, 'jsdoc-validator'
, 'jsdoc-validator.jar')) |
| 240 | 240 |
| 241 modules_dir = tempfile.mkdtemp() | 241 modules_dir = tempfile.mkdtemp() |
| 242 common_closure_args = [ | 242 common_closure_args = [ |
| 243 '--summary_detail_level', '3', | 243 '--summary_detail_level', '3', |
| 244 '--jscomp_error', 'visibility', | 244 '--jscomp_error', 'visibility', |
| 245 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', | 245 '--compilation_level', 'SIMPLE_OPTIMIZATIONS', |
| 246 '--warning_level', 'VERBOSE', | 246 '--warning_level', 'VERBOSE', |
| 247 '--language_in=ES6_STRICT', | 247 '--language_in=ES6_STRICT', |
| 248 '--language_out=ES5_STRICT', | 248 '--language_out=ES5_STRICT', |
| 249 '--accept_const_keyword', | |
| 250 '--extra_annotation_name', 'suppressReceiverCheck', | 249 '--extra_annotation_name', 'suppressReceiverCheck', |
| 251 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', | 250 '--extra_annotation_name', 'suppressGlobalPropertiesCheck', |
| 252 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep
) | 251 '--module_output_path_prefix', to_platform_path_exact(modules_dir + path.sep
) |
| 253 ] | 252 ] |
| 254 | 253 |
| 255 worker_modules_by_name = {} | 254 worker_modules_by_name = {} |
| 256 dependents_by_module_name = {} | 255 dependents_by_module_name = {} |
| 257 | 256 |
| 258 for module_name in descriptors.application: | 257 for module_name in descriptors.application: |
| 259 module = descriptors.modules[module_name] | 258 module = descriptors.modules[module_name] |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject
edScriptOut if validateInjectedScriptOut else '<empty>') | 502 print 'Validate InjectedScriptSource.js output:%s' % os.linesep, (validateInject
edScriptOut if validateInjectedScriptOut else '<empty>') |
| 504 errors_found |= hasErrors(validateInjectedScriptOut) | 503 errors_found |= hasErrors(validateInjectedScriptOut) |
| 505 | 504 |
| 506 if errors_found: | 505 if errors_found: |
| 507 print 'ERRORS DETECTED' | 506 print 'ERRORS DETECTED' |
| 508 | 507 |
| 509 os.remove(injectedScriptSourceTmpFile) | 508 os.remove(injectedScriptSourceTmpFile) |
| 510 os.remove(compiler_args_file.name) | 509 os.remove(compiler_args_file.name) |
| 511 os.remove(protocol_externs_file) | 510 os.remove(protocol_externs_file) |
| 512 shutil.rmtree(modules_dir, True) | 511 shutil.rmtree(modules_dir, True) |
| OLD | NEW |