Skip to content

Commit

Permalink
edit: don't use require for json modules
Browse files Browse the repository at this point in the history
  • Loading branch information
duckdoom4 committed May 30, 2022
1 parent 073f9af commit 41a4376
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/navigation-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { cleanUpPath, extractFilenameWithoutExtension, getFileWithPath, getNavig
import * as fs from "fs";
import { Displayable } from "./displayable";
import { Character } from "./character";

import data from "./renpy.json";
import kwData from "./renpyauto.json";
const filterCharacter = "\u2588";

export class NavigationData {
Expand All @@ -27,10 +28,7 @@ export class NavigationData {
static async init(extensionPath: string) {
console.log(`NavigationData init`);

const data = require(`${extensionPath}/src/renpy.json`);
NavigationData.renpyFunctions = data;

const kwData = require(`${extensionPath}/src/renpyauto.json`);
NavigationData.autoCompleteKeywords = kwData;

NavigationData.renpyAutoComplete = [];
Expand Down

0 comments on commit 41a4376

Please sign in to comment.