From 509f03145e5e65eb467a4d8b8fcf1d43e6cd2be2 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Mon, 22 Jan 2024 22:53:29 -0800 Subject: [PATCH] Change scripts, add missing import --- package.json | 9 ++++----- src/{convert.js => convertToTermDictionary.js} | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) rename src/{convert.js => convertToTermDictionary.js} (99%) diff --git a/package.json b/package.json index b4674ea..da7026a 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,8 @@ { "scripts": { - "start": "npm run getURL && npm run download", - "getURL": "node src/downloadLatest.js", - "download": "sh src/scripts/download_unzip.sh", - "build": "node src/convert.js", + "download": "node src/downloadLatest.js && sh src/scripts/download_unzip.sh", + "buildTermDict": "node src/convertToTermDictionary.js", + "buildLatest": "npm run download && npm run buildTermDict", "test": "ava" }, "dependencies": { @@ -17,4 +16,4 @@ "ava": "^6.0.1" }, "version": "1.0.0" -} +} \ No newline at end of file diff --git a/src/convert.js b/src/convertToTermDictionary.js similarity index 99% rename from src/convert.js rename to src/convertToTermDictionary.js index bb61ff2..acf21cc 100644 --- a/src/convert.js +++ b/src/convertToTermDictionary.js @@ -1,5 +1,6 @@ import { Dictionary, DictionaryIndex } from 'yomichan-dict-builder'; import path from 'path'; +import fs from 'fs'; import { getCSVInfo } from './util/csv/csvHandler.js'; import { parseCSVEntries } from './util/csv/parseCsvEntriesToJson.js';