From 6f8f06d5e2d65f7d3c30a861bae1b1801daa8f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 7 Mar 2019 02:23:12 +0100 Subject: [PATCH] move dictionaries to folder --- x2i/{ => dictionaries}/apie-keys.yaml | 0 x2i/{ => dictionaries}/chr.ts | 0 x2i/{ => dictionaries}/i-keys.yaml | 0 x2i/{ => dictionaries}/ik-keys.yaml | 0 x2i/{ => dictionaries}/x2i-keys.yaml | 0 x2i/{ => dictionaries}/z2i-keys.yaml | 0 x2i/index.ts | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) rename x2i/{ => dictionaries}/apie-keys.yaml (100%) rename x2i/{ => dictionaries}/chr.ts (100%) rename x2i/{ => dictionaries}/i-keys.yaml (100%) rename x2i/{ => dictionaries}/ik-keys.yaml (100%) rename x2i/{ => dictionaries}/x2i-keys.yaml (100%) rename x2i/{ => dictionaries}/z2i-keys.yaml (100%) diff --git a/x2i/apie-keys.yaml b/x2i/dictionaries/apie-keys.yaml similarity index 100% rename from x2i/apie-keys.yaml rename to x2i/dictionaries/apie-keys.yaml diff --git a/x2i/chr.ts b/x2i/dictionaries/chr.ts similarity index 100% rename from x2i/chr.ts rename to x2i/dictionaries/chr.ts diff --git a/x2i/i-keys.yaml b/x2i/dictionaries/i-keys.yaml similarity index 100% rename from x2i/i-keys.yaml rename to x2i/dictionaries/i-keys.yaml diff --git a/x2i/ik-keys.yaml b/x2i/dictionaries/ik-keys.yaml similarity index 100% rename from x2i/ik-keys.yaml rename to x2i/dictionaries/ik-keys.yaml diff --git a/x2i/x2i-keys.yaml b/x2i/dictionaries/x2i-keys.yaml similarity index 100% rename from x2i/x2i-keys.yaml rename to x2i/dictionaries/x2i-keys.yaml diff --git a/x2i/z2i-keys.yaml b/x2i/dictionaries/z2i-keys.yaml similarity index 100% rename from x2i/z2i-keys.yaml rename to x2i/dictionaries/z2i-keys.yaml diff --git a/x2i/index.ts b/x2i/index.ts index 274879e..fff8bc0 100644 --- a/x2i/index.ts +++ b/x2i/index.ts @@ -38,7 +38,7 @@ const regex = OuterXRegExp( const defaultMatchAction = (left: string, match: string, right: string) => left + match + right; const defaultMatchFunction = (match: string, keys: ([RegExp, string | ((m: {[key: string]: string;}) => string), string][])) => OuterXRegExp.replaceEach(match, keys as (RegExp | string)[][]) -import * as chr from "./chr"; +import * as chr from "./dictionaries/chr"; const matchType: { [key: string]: IMatchInstructions } = { chr: { @@ -47,21 +47,21 @@ const matchType: { [key: string]: IMatchInstructions } = { }, ik: { join: (_, match) => `- ${match}`, - keys: readKeys("./x2i/ik-keys.yaml"), + keys: readKeys("./x2i/dictionaries/ik-keys.yaml"), }, p: { join: (_, match) => `*${match}`, - keys: readKeys("./x2i/apie-keys.yaml"), + keys: readKeys("./x2i/dictionaries/apie-keys.yaml"), }, x: { - keys: readKeys("./x2i/x2i-keys.yaml"), + keys: readKeys("./x2i/dictionaries/x2i-keys.yaml"), }, z: { - keys: readKeys("./x2i/z2i-keys.yaml"), + keys: readKeys("./x2i/dictionaries/z2i-keys.yaml"), }, i: { join: (_, match) => `- ${match}`, - keys: readKeys("./x2i/i-keys.yaml"), + keys: readKeys("./x2i/dictionaries/i-keys.yaml"), }, };