Skip to content

Commit

Permalink
updated minify script
Browse files Browse the repository at this point in the history
  • Loading branch information
Chr1Z93 committed Nov 24, 2024
1 parent 7c7f3e2 commit dabcde9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minify.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
def minify_json_files(directory):
directory_path = Path(directory)
for json_file in directory_path.glob("*.json"):
with open(json_file, "r") as f:
with open(json_file, "r", encoding="utf-8") as f:
data = json.load(f)

with open(json_file, "w") as f:
json.dump(data, f, separators=(",", ":"))
with open(json_file, "w", encoding="utf-8") as f:
json.dump(data, f, separators=(",", ":"), ensure_ascii=False)

if __name__ == "__main__":
minify_json_files(OUTPUT_DIR)

0 comments on commit dabcde9

Please sign in to comment.