()
| 488 | |
| 489 | |
| 490 | def get_closure_compiler(): |
| 491 | # First check if the user configured a specific CLOSURE_COMPILER in their settings |
| 492 | if config.CLOSURE_COMPILER: |
| 493 | return config.CLOSURE_COMPILER |
| 494 | |
| 495 | # Otherwise use the one installed via npm |
| 496 | cmd = shared.get_npm_cmd('google-closure-compiler') |
| 497 | if not WINDOWS: |
| 498 | # Work around an issue that Closure compiler can take up a lot of memory and crash in an error |
| 499 | # "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap |
| 500 | # out of memory" |
| 501 | cmd.insert(-1, '--max_old_space_size=8192') |
| 502 | return cmd |
| 503 | |
| 504 | |
| 505 | def check_closure_compiler(cmd, args, env, allowed_to_fail): |
no test coverage detected