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