Skip to content

Commit ce105db

Browse files
authored
Use es-check (during testing) to verify output is ES5 compliant. (#12139)
This prevents developers or tools such as closure or other js optimization passes from inadvertently adding constructs that are not ES5 compliant. See #12128
1 parent fc490e9 commit ce105db

File tree

7 files changed

+700
-11
lines changed

7 files changed

+700
-11
lines changed

emcc.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,10 +3012,7 @@ def minify_html(filename, options):
30123012
logger.debug('minifying HTML file ' + filename)
30133013
size_before = os.path.getsize(filename)
30143014
start_time = time.time()
3015-
try:
3016-
run_process([shared.path_from_root('node_modules', '.bin', 'html-minifier-terser' + ('.cmd' if WINDOWS else '')), filename, '-o', filename] + opts, env=shared.env_with_node_in_path())
3017-
except OSError:
3018-
exit_with_error('html-minifier-terser was not found! Please run "npm install" in Emscripten root directory to set up npm dependencies!')
3015+
run_process(shared.get_npm_cmd('html-minifier-terser') + [filename, '-o', filename] + opts, env=shared.env_with_node_in_path())
30193016

30203017
elapsed_time = time.time() - start_time
30213018
size_after = os.path.getsize(filename)

0 commit comments

Comments
 (0)