Skip to content

Commit

Permalink
not needed anymore because pretty print
Browse files Browse the repository at this point in the history
  • Loading branch information
FuzzyGamesOn committed Sep 27, 2024
1 parent f17ea7d commit 9d43601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions js/exporter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { encodeJsonWithSpacing, fixRegionsSpacing } from "./helpers.js";
import { encodeJsonWithSpacing } from "./helpers.js";

export class Exporter {
vue = null;
Expand Down Expand Up @@ -55,7 +55,7 @@ export class Exporter {
zip.folder(folder_name).file('data/game.json', encodeJsonWithSpacing(this.game));
zip.folder(folder_name).file('data/items.json', encodeJsonWithSpacing(this.items));
zip.folder(folder_name).file('data/locations.json', encodeJsonWithSpacing(this.locations));
zip.folder(folder_name).file('data/regions.json', fixRegionsSpacing(encodeJsonWithSpacing(this.regions)));
zip.folder(folder_name).file('data/regions.json', encodeJsonWithSpacing(this.regions));
zip.folder(folder_name).file('data/categories.json', encodeJsonWithSpacing(this.categories));


Expand Down
7 changes: 0 additions & 7 deletions js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,3 @@ export function encodeJsonWithSpacing(js_object) {

return json_content;
}

export function fixRegionsSpacing(json_content) {
return json_content
.replace(/\{\"/g, '{\n\t\"')
.replace(/\}\,\"/g, '},\n\t"')
.replace(/\}\}/g, '\n}\n}').trim();
}

0 comments on commit 9d43601

Please sign in to comment.