-
Notifications
You must be signed in to change notification settings - Fork 12
/
package.json
127 lines (127 loc) · 6.14 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
"name": "tinyld",
"description": "Simple and Performant Language detection library (pure JS and zero dependencies)",
"version": "1.3.4",
"license": "MIT",
"exports": {
"./light": {
"require": "./dist/tinyld.light.node.js",
"import": "./dist/tinyld.light.node.mjs",
"browser": "./dist/tinyld.light.browser.js",
"types": "./dist/tinyld.light.node.d.ts"
},
"./heavy": {
"require": "./dist/tinyld.heavy.node.js",
"import": "./dist/tinyld.heavy.node.mjs",
"browser": "./dist/tinyld.heavy.browser.js",
"types": "./dist/tinyld.heavy.node.d.ts"
},
".": {
"require": "./dist/tinyld.normal.node.js",
"import": "./dist/tinyld.normal.node.mjs",
"browser": "./dist/tinyld.normal.browser.js",
"types": "./dist/tinyld.normal.node.d.ts"
}
},
"typesVersions": {
"*": {
"light": [
"./dist/tinyld.light.node.d.ts"
],
"heavy": [
"./dist/tinyld.heavy.node.d.ts"
],
"*": [
"./dist/tinyld.normal.node.d.ts"
]
}
},
"bin": {
"tinyld": "./bin/tinyld.js",
"tinyld-light": "./bin/tinyld-light.js",
"tinyld-heavy": "./bin/tinyld-heavy.js"
},
"keywords": [
"lang",
"language",
"language detection",
"natural-language",
"detect",
"detector",
"n-gram"
],
"repository": {
"type": "git",
"url": "https://github.com/komodojp/tinyld.git"
},
"author": {
"name": "Kevin Destrem",
"email": "[email protected]"
},
"scripts": {
"train": "run-p train:*",
"train:normal": "cross-env TINYLD_CONFIG=normal ts-node src/train.ts",
"train:light": "cross-env TINYLD_CONFIG=light ts-node src/train.ts",
"train:heavy": "cross-env TINYLD_CONFIG=heavy ts-node src/train.ts",
"bench": "run-s bench:*",
"bench:tinyld": "cross-env TINYLD_CONFIG=normal ts-node src/benchmark/tinyld.ts",
"bench:tinyld-light": "cross-env TINYLD_CONFIG=light ts-node src/benchmark/tinyld_light.ts",
"bench:tinyld-heavy": "cross-env TINYLD_CONFIG=heavy ts-node src/benchmark/tinyld_heavy.ts",
"bench:cld": "ts-node src/benchmark/cld.ts",
"bench:franc": "ts-node src/benchmark/franc.ts",
"bench:franc-all": "ts-node src/benchmark/franc-all.ts",
"bench:franc-min": "ts-node src/benchmark/franc-min.ts",
"bench:langdetect": "ts-node src/benchmark/langdetect.ts",
"bench:languagedetect": "ts-node src/benchmark/languagedetect.ts",
"build": "run-p build:*",
"build:normal-node": "esbuild src/index.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"normal\\\"} --bundle --charset=utf8 --minify --platform=node --outfile=dist/tinyld.normal.node.js",
"build:normal-node-esm": "esbuild src/index.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"normal\\\"} --bundle --charset=utf8 --minify --platform=node --format=esm --outfile=dist/tinyld.normal.node.mjs",
"build:normal-web": "esbuild src/index.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"normal\\\"} --bundle --charset=utf8 --platform=browser --format=esm --outfile=dist/tinyld.normal.browser.js",
"build:light-node": "esbuild src/index_light.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"light\\\"} --bundle --charset=utf8 --minify --platform=node --outfile=dist/tinyld.light.node.js",
"build:light-node-esm": "esbuild src/index_light.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"light\\\"} --bundle --charset=utf8 --minify --platform=node --format=esm --outfile=dist/tinyld.light.node.mjs",
"build:light-web": "esbuild src/index_light.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"light\\\"} --bundle --charset=utf8 --minify --platform=browser --format=esm --outfile=dist/tinyld.light.browser.js",
"build:heavy-node": "esbuild src/index_heavy.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"heavy\\\"} --bundle --charset=utf8 --minify --platform=node --outfile=dist/tinyld.heavy.node.js",
"build:heavy-node-esm": "esbuild src/index_heavy.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"heavy\\\"} --bundle --charset=utf8 --minify --platform=node --format=esm --outfile=dist/tinyld.heavy.node.mjs",
"build:heavy-web": "esbuild src/index_heavy.ts --define:process.env={\\\"TINYLD_CONFIG\\\":\\\"heavy\\\"} --bundle --charset=utf8 --minify --platform=browser --format=esm --outfile=dist/tinyld.heavy.browser.js",
"build:type": "run-s build:type:*",
"build:type:build": "tsc --emitDeclarationOnly --declaration --project tsconfig.json --outDir dist",
"build:type:normal": "mv ./dist/index.d.ts ./dist/tinyld.normal.node.d.ts && cp ./dist/tinyld.normal.node.d.ts ./dist/tinyld.normal.browser.d.ts",
"build:type:light": "mv ./dist/index_light.d.ts ./dist/tinyld.light.node.d.ts && cp ./dist/tinyld.light.node.d.ts ./dist/tinyld.light.browser.d.ts",
"build:type:heavy": "mv ./dist/index_heavy.d.ts ./dist/tinyld.heavy.node.d.ts && cp ./dist/tinyld.heavy.node.d.ts ./dist/tinyld.heavy.browser.d.ts",
"build:post": "yarn gen:svg && yarn gen:mkd && yarn lint",
"gen:mkd": "node ./utils/mkdown.js",
"gen:svg": "node ./utils/index.js",
"lint": "eslint --ext .js,.ts --fix ./ && prettier --config .prettierrc --ignore-path .prettierignore --write \"**/*.{ts,js,md}\"",
"test": "run-p test:*",
"test:unit": "uvu tests",
"test:dependencies": "yarn audit --level high || echo \"Run 'yarn update' to interactively update dependencies for this project\"",
"test:lint": "eslint --ext .js,.ts ./ && prettier --config .prettierrc --ignore-path .prettierignore --check \"**/*.{ts,js}\"",
"test:types": "tsc --noEmit"
},
"devDependencies": {
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.5",
"chartist-svg": "^0.2.3",
"cld": "^2.7.0",
"cross-env": "^7.0.3",
"esbuild": "^0.14.0",
"eslint": "^7.32.0",
"franc": "^5.0.0",
"franc-all": "^5.0.0",
"franc-min": "^5.0.0",
"langdetect": "^0.2.1",
"languagedetect": "^2.0.0",
"npm-run-all": "^4.1.5",
"p-limit": "3.1.0",
"prettier": "^2.3.2",
"ts-node": "^10.2.0",
"typescript": "^4.3.5",
"uvu": "^0.5.1"
},
"engines": {
"node": ">= 12.10.0",
"npm": ">= 6.12.0",
"yarn": ">= 1.20.0"
}
}