Skip to content

Commit 64c19f8

Browse files
authored
Merge pull request #143 from dibenede/disable-optimizations
Return to using default closure optimization level
2 parents 3b3a8ab + 0466dbc commit 64c19f8

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

gulpfile.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,9 @@ function genproto_group3_commonjs_strict(cb) {
117117
}
118118

119119

120-
function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
121-
let compilationLevel = 'ADVANCED';
122-
if (keepSymbols === true) {
123-
compilationLevel = 'SIMPLE';
124-
}
125-
120+
function getClosureCompilerCommand(exportsFile, outputFile) {
121+
// Use the default optimization level: SIMPLE_OPTIMIZATIONS:
122+
// https://developers.google.com/closure/compiler/docs/compilation_levels#simple_optimizations
126123
const closureLib = 'node_modules/google-closure-library';
127124
return [
128125
'node_modules/.bin/google-closure-compiler',
@@ -139,13 +136,13 @@ function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
139136
'--js=binary/utils.js',
140137
'--js=binary/writer.js',
141138
`--js=${exportsFile}`,
142-
`--compilation_level="${compilationLevel}"`,
143139
'--generate_exports',
144140
'--export_local_property_definitions',
145141
`--entry_point=${exportsFile}`, `> ${outputFile}`
146142
].join(' ');
147143
}
148144

145+
149146
function gen_google_protobuf_js(cb) {
150147
exec(
151148
getClosureCompilerCommand('commonjs/export.js', 'google-protobuf.js'),
@@ -157,8 +154,7 @@ function commonjs_testdeps(cb) {
157154
'mkdir -p commonjs_out/test_node_modules && ' +
158155
getClosureCompilerCommand(
159156
'commonjs/export_testdeps.js',
160-
'commonjs_out/test_node_modules/testdeps_commonjs.js',
161-
true),
157+
'commonjs_out/test_node_modules/testdeps_commonjs.js'),
162158
make_exec_logging_callback(cb));
163159
}
164160

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)