compiler javascript with python

The compiler is an optimized JavaScript jar package, it will parse your javascript and analyzed, removed some obsolete code from the google, and existing code variables to adjust for short variable, reducing the javascript codevolume. Also check syntax, reference code and prompt. The tool have to use gmail, google maps, google docs. Is a very good tool for checking code can be optimized, but also when an obfuscation tool to use.

Specific use of parameters is very simple, including the source js file, the output js file, a detailed reference to their official website home page. https://developers.google.com/closure/compiler/

Below to write a python script to facilitate calls compression optimization, source file to be compressed, build compressed files are stored:

import os
source = 'D:\higis_min\higis_1.0_min.js'
build = 'D:\higis_min\higis_1.0_min_last.js'
header = '// higis_1.0_min.js - http://www.higis.org/himap\n'

os.system( 'java -jar compiler/compiler.jar --language_in=ECMASCRIPT5 --js ' + source + ' --js_output_file ' + build )

本文固定链接: http://www.higis.org/en/2012/06/26/compiler-javascript-in-python/ | Hi,GIS


该日志由 H.J 于2012年06月26日发表在 Program 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: compiler javascript with python | Hi,GIS
关键字: , , , ,
【上一篇】
【下一篇】

compiler javascript with python:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter