-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b1da6f
commit 737ef7a
Showing
11 changed files
with
225,653 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"overrides": [ | ||
{ | ||
"files": "**/files.ts", | ||
"options": { | ||
"printWidth": 120 | ||
} | ||
}, | ||
{ | ||
"files": "**/featuredFigures.json", | ||
"options": { | ||
"printWidth": 130 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.formatOnSave": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
|
||
export const files = { | ||
kanjidicInput1: vendor("kanjidic/kanji_bank_1.json"), | ||
kanjidicInput2: vendor("kanjidic/kanji_bank_2.json"), | ||
}; | ||
|
||
function vendor<S extends string>(string: S) { | ||
return path.resolve(__dirname, "vendor", string) as `${string}/vendor/${S}`; | ||
} | ||
|
||
function readTextFileSync<T>(filepath: string) { | ||
return fs.readFileSync(filepath, "utf-8") as T; | ||
} | ||
export function readJsonSync<T>(filepath: string) { | ||
return JSON.parse(readTextFileSync(filepath)) as T; | ||
} |
Oops, something went wrong.