From d5e12d6a23b97b24f4c9e4d9f239cc5fb40d9d47 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Wed, 16 Sep 2015 13:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9D=99=E6=80=81=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8E=8B=E7=BC=A9=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/release_static.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/release_static.py b/tools/release_static.py index 0a51b8a7..f937ae33 100644 --- a/tools/release_static.py +++ b/tools/release_static.py @@ -9,6 +9,12 @@ template_release_path = "template/release/" static_src_path = "static/src/" static_release_path = "static/release/" + +print "Begin to compress js" +if os.system("node static/src/js/r.js -o static/src/js/build.js"): + print "Failed to compress js, exit" + exit() + try: # 删除模板的 release 文件夹 shutil.rmtree(template_release_path) @@ -30,7 +36,7 @@ name_map = {} def process(match): file_path = match.group(1).replace("/static/", "") - # print file_path, match.group(), match.group(1) + print "Processing: " + file_path if not os.path.exists(static_release_path + file_path): return match.group(0) @@ -59,3 +65,5 @@ for root, dirs, files in os.walk(template_release_path): f = open(html_path, "w") f.write(css_replaced_html_content) f.close() + +print "Done" \ No newline at end of file