genPOI: apply consistent sorting to markers.js and markersDB.js
use json.dumps(sort_keys=True) to apply a consistent sorting to the output JS files. improves the readability of diffs and making config testing easier
This commit is contained in:
@@ -598,11 +598,11 @@ def main():
|
||||
|
||||
with open(os.path.join(destdir, "markersDB.js"), "w") as output:
|
||||
output.write("var markersDB=")
|
||||
json.dump(markers, output, indent=2)
|
||||
json.dump(markers, output, sort_keys=True, indent=2)
|
||||
output.write(";\n")
|
||||
with open(os.path.join(destdir, "markers.js"), "w") as output:
|
||||
output.write("var markers=")
|
||||
json.dump(marker_groups, output, indent=2)
|
||||
json.dump(marker_groups, output, sort_keys=True, indent=2)
|
||||
output.write(";\n")
|
||||
with open(os.path.join(destdir, "baseMarkers.js"), "w") as output:
|
||||
output.write("overviewer.util.injectMarkerScript('markersDB.js');\n")
|
||||
|
||||
Reference in New Issue
Block a user