Skip to content

Commit

Permalink
refactor: Move base maps out of bundle (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Mar 31, 2022
1 parent 4fe3a15 commit 0af5d6d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
coverage/
lib/
src/maps/
maps/
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/trie/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getTrie, TrieNode } from "./trie";
import { encodeTrie } from "./encode-trie";
import { BinTrieFlags } from "../../src/decode";
import xmlMap from "../../src/maps/xml.json";
import xmlMap from "../../maps/xml.json";

/**
* Utils for analzying the encoded trie.
Expand Down
6 changes: 3 additions & 3 deletions scripts/write-decode-map.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from "fs";
import entityMap from "../src/maps/entities.json";
import legacyMap from "../src/maps/legacy.json";
import xmlMap from "../src/maps/xml.json";
import entityMap from "../maps/entities.json";
import legacyMap from "../maps/legacy.json";
import xmlMap from "../maps/xml.json";

import { getTrie } from "./trie/trie";
import { encodeTrie } from "./trie/encode-trie";
Expand Down
4 changes: 2 additions & 2 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import path from "path";
import * as entities from ".";
import legacy from "./maps/legacy.json";
import legacy from "../maps/legacy.json";

const levels = ["xml", "entities"];

describe("Documents", () => {
const levelDocs = levels
.map((n) => path.join("..", "src", "maps", n))
.map((n) => path.join("..", "maps", n))
.map(require)
.map((doc, i) => [i, doc]);

Expand Down

0 comments on commit 0af5d6d

Please sign in to comment.