Skip to content

Commit

Permalink
Add dist data and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
xinbenlv committed Jun 29, 2024
1 parent 2afc05a commit 2276326
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@namefi/cat",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Namefi Categorizer",
"homepage": "https://namefi.io",
"scripts": {
"test": "jest",
"build": "tsc"
"build": "tsc && cp -R src/data dist/data"
},

"engines": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion src/english-word-club.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

import * as fs from 'fs';
import path from 'path';
const mit10k_en_us_path = path.resolve(__dirname, './data/mit10k-en-US.txt');

const mit10k_en_us = fs.readFileSync(path.resolve(__dirname, './data/mit10k-en-US.txt'), 'utf8').split('\n');
console.log(`XXX __dirname=`, __dirname);

console.log(`XXX mit10k_en_us_path=`, mit10k_en_us_path);
const mit10k_en_us = fs.readFileSync(mit10k_en_us_path, 'utf8').split('\n');
const gwtwc_top_333k = fs.readFileSync(path.resolve(__dirname, './data/gwtwc/count_1w.txt'), 'utf8').split('\n')
.map((line) => {
const word = line.split('\t')[0];
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"strict": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist", "**/*.spec.ts"]
}

0 comments on commit 2276326

Please sign in to comment.