mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-06-05 01:43:22 +03:00
Add Python script to minify JS in the app
This commit is contained in:
parent
bd78051a9d
commit
be3a7d6d80
15
app/minify.py
Normal file
15
app/minify.py
Normal file
@ -0,0 +1,15 @@
|
||||
# Python 3
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
uglifyjs = os.path.abspath("../lib/uglifyjs")
|
||||
input_dir = os.path.abspath("./Resources/Tracker/scripts")
|
||||
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
|
||||
|
||||
for file in glob.glob(input_dir + "/*.js"):
|
||||
name = os.path.basename(file)
|
||||
print("Minifying {0}...".format(name))
|
||||
os.system("{0} {1} -o {2}/{3}".format(uglifyjs, file, output_dir, name))
|
||||
|
||||
print("Done!")
|
Loading…
x
Reference in New Issue
Block a user