@@ -117,12 +117,9 @@ function genproto_group3_commonjs_strict(cb) {
117
117
}
118
118
119
119
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
126
123
const closureLib = 'node_modules/google-closure-library' ;
127
124
return [
128
125
'node_modules/.bin/google-closure-compiler' ,
@@ -139,13 +136,13 @@ function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
139
136
'--js=binary/utils.js' ,
140
137
'--js=binary/writer.js' ,
141
138
`--js=${ exportsFile } ` ,
142
- `--compilation_level="${ compilationLevel } "` ,
143
139
'--generate_exports' ,
144
140
'--export_local_property_definitions' ,
145
141
`--entry_point=${ exportsFile } ` , `> ${ outputFile } `
146
142
] . join ( ' ' ) ;
147
143
}
148
144
145
+
149
146
function gen_google_protobuf_js ( cb ) {
150
147
exec (
151
148
getClosureCompilerCommand ( 'commonjs/export.js' , 'google-protobuf.js' ) ,
@@ -157,8 +154,7 @@ function commonjs_testdeps(cb) {
157
154
'mkdir -p commonjs_out/test_node_modules && ' +
158
155
getClosureCompilerCommand (
159
156
'commonjs/export_testdeps.js' ,
160
- 'commonjs_out/test_node_modules/testdeps_commonjs.js' ,
161
- true ) ,
157
+ 'commonjs_out/test_node_modules/testdeps_commonjs.js' ) ,
162
158
make_exec_logging_callback ( cb ) ) ;
163
159
}
164
160
0 commit comments