[mergejs] Restore disabled js minification. 03/216903/2
authorMichal Michalski <m.michalski2@partner.samsung.com>
Mon, 4 Nov 2019 18:04:22 +0000 (19:04 +0100)
committerMichal Michalski <m.michalski2@partner.samsung.com>
Mon, 4 Nov 2019 18:07:28 +0000 (19:07 +0100)
My previous change in mergejs.py and generate_api.py scripts
accidentally disabled javascript source minification, which resulted
in larger rpm packages sizes. This commit enables the minification.

[Verification] Packages contain minified sources.

Signed-off-by: Michal Michalski <m.michalski2@partner.samsung.com>
Change-Id: I43d46aca083806885939aee296391eec3ecc0b5b

tools/mergejs.py

index 53372a0..a8230b0 100755 (executable)
@@ -16,7 +16,6 @@
 #    limitations under the License.
 
 
-
 import sys
 import os
 import re
@@ -42,7 +41,7 @@ def _process_file(path, includes_directory="js"):
 
 def process_file(path, includes_directory="js"):
     lines = _process_file(path, includes_directory)
-    return "\n".join(lines)
+    return slimit.minify("\n".join(lines))
 
 
 if __name__ == '__main__':
@@ -52,7 +51,6 @@ if __name__ == '__main__':
 
     opts = opt_parser.parse_args()
     code = process_file(opts.file, opts.path)
-    code = slimit.minify(code)
 
     print(code)