diff --git a/ts-minifier.py b/ts-minifier.py index 0340f10..70f9db1 100644 --- a/ts-minifier.py +++ b/ts-minifier.py @@ -1,6 +1,6 @@ # Copyright (c) 2021 bleck9999 # https://github.com/bleck9999/ts-minifier -# Version: 1095d14a +# Version: c1b874bb import argparse import itertools @@ -181,15 +181,15 @@ def minify(script: Code, userobjects, usages): userobjects[minName] = "TRN" break if not minName: - print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened but no available " - f"names found (would save {uses} bytes)") + print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened but " + f"no available names found (would save {uses} bytes)") continue # we assume that nobody is insane enough to exhaust all *2,808* 2 character names, # instead that uo is len 2 and all the 1 character names are in use (because of that we dont multiply # uses by anything as multiplying by a difference of 1 would be redundant) if not auto_replace: print(f"{'Function' if otype == 'func' else 'Variable'} name {uo} could be shortened ({uo}->{minName}, " - f"would save {uses*(uolen - len(minName))} bytes") + f"would save {uses*(uolen - len(minName))} bytes)") continue else: print(f"Renaming {'Function' if otype == 'func' else 'Variable'} {uo} to {minName} "