From: Michal Michalski Date: Mon, 4 Nov 2019 18:04:22 +0000 (+0100) Subject: [mergejs] Restore disabled js minification. X-Git-Tag: submit/tizen_5.5/20191105.125113~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b41982699d1417b3be3bb1cc4eda82c34dd6bb17;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [mergejs] Restore disabled js minification. 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 Change-Id: I43d46aca083806885939aee296391eec3ecc0b5b --- diff --git a/tools/mergejs.py b/tools/mergejs.py index 53372a0a..a8230b05 100755 --- a/tools/mergejs.py +++ b/tools/mergejs.py @@ -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)