diff --git a/.gitignore b/.gitignore index 3144fc3..929e9d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ *.bz2 *.zip +.tsimp + # Created by https://www.toptal.com/developers/gitignore/api/node # Edit at https://www.toptal.com/developers/gitignore?templates=node diff --git a/bun.lockb b/bun.lockb index d9741af..0cbe8e2 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index b8a0eee..808437f 100644 --- a/package.json +++ b/package.json @@ -2,19 +2,29 @@ "version": "1.4.0", "scripts": { "test": "ava", - "buildja": "node .\\src\\convertWikipedia.js ja 2022-12-01" + "start": "bun run src/index.ts" }, "dependencies": { "pinyin-pro": "^3.18.5", + "tsimp": "^2.0.11", "yomichan-dict-builder": "^1.3.2" }, "type": "module", "devDependencies": { - "ava": "^6.0.1", - "@types/bun": "latest" + "@ava/typescript": "^5.0.0", + "@types/bun": "latest", + "ava": "^6.0.1" }, "name": "wikipedia-yomitan", "peerDependencies": { "typescript": "^5.0.0" + }, + "ava": { + "extensions": { + "ts": "module" + }, + "nodeArguments": [ + "--import=tsimp" + ] } } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 238655f..3ad96b4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,13 @@ { "compilerOptions": { - // Enable latest features "lib": ["ESNext", "DOM"], "target": "ESNext", "module": "ESNext", - "moduleDetection": "force", "jsx": "react-jsx", "allowJs": true, - - // Bundler mode - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "noEmit": true, - - // Best practices + "moduleResolution": "node", "strict": true, "skipLibCheck": true, - "noFallthroughCasesInSwitch": true, - - // Some stricter flags (disabled by default) - "noUnusedLocals": false, - "noUnusedParameters": false, - "noPropertyAccessFromIndexSignature": false + "noFallthroughCasesInSwitch": true } }