Skip to content

Return to using default closure optimization level #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,7 @@ function genproto_group3_commonjs_strict(cb) {
}


function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
let compilationLevel = 'ADVANCED';
if (keepSymbols === true) {
compilationLevel = 'SIMPLE';
}

function getClosureCompilerCommand(exportsFile, outputFile) {
const closureLib = 'node_modules/google-closure-library';
return [
'node_modules/.bin/google-closure-compiler',
Expand All @@ -139,13 +134,13 @@ function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
'--js=binary/utils.js',
'--js=binary/writer.js',
`--js=${exportsFile}`,
`--compilation_level="${compilationLevel}"`,
'--generate_exports',
'--export_local_property_definitions',
`--entry_point=${exportsFile}`, `> ${outputFile}`
].join(' ');
}


function gen_google_protobuf_js(cb) {
exec(
getClosureCompilerCommand('commonjs/export.js', 'google-protobuf.js'),
Expand All @@ -157,8 +152,7 @@ function commonjs_testdeps(cb) {
'mkdir -p commonjs_out/test_node_modules && ' +
getClosureCompilerCommand(
'commonjs/export_testdeps.js',
'commonjs_out/test_node_modules/testdeps_commonjs.js',
true),
'commonjs_out/test_node_modules/testdeps_commonjs.js'),
make_exec_logging_callback(cb));
}

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.