taraskevizer 5.1.10 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/bin.js +19 -3
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ const latinizerWithJi = new Taraskevizer({
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
latinizerWithJi.convertAlphabetOnly('яна і іншыя');
|
|
64
|
-
// "jana
|
|
64
|
+
// "jana j jinšyja"
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
# Options
|
|
@@ -106,6 +106,8 @@ Default `true`
|
|
|
106
106
|
|
|
107
107
|
If set to false, may cause unwanted changes in acronyms.
|
|
108
108
|
|
|
109
|
+
Is always `true` in `convertAlphabetOnly`.
|
|
110
|
+
|
|
109
111
|
### OVERRIDE_taraskevize
|
|
110
112
|
|
|
111
113
|
Type: `(text: string) => string`
|
|
@@ -238,6 +240,7 @@ tarask "планета"
|
|
|
238
240
|
```bash
|
|
239
241
|
# Alpabet
|
|
240
242
|
--latin (-l)
|
|
243
|
+
--latin-ji (-lj)
|
|
241
244
|
--arabic (-a)
|
|
242
245
|
# When to replace і(i) by й(j) after vowels
|
|
243
246
|
--jrandom (-jr)
|
|
@@ -247,11 +250,12 @@ tarask "планета"
|
|
|
247
250
|
# Variations
|
|
248
251
|
--no-variations (-nv)
|
|
249
252
|
--first-variation-only (-fvo)
|
|
253
|
+
# Mode
|
|
254
|
+
--html (-html)
|
|
255
|
+
--alphabet-only (-abc)
|
|
250
256
|
# Other
|
|
251
257
|
--not-escape-caps (-nec)
|
|
252
258
|
--no-color (-nc)
|
|
253
|
-
--html (-html)
|
|
254
|
-
--alphabet-only (-abc) # not working; WIP
|
|
255
259
|
```
|
|
256
260
|
|
|
257
261
|
# Known bugs
|
package/dist/bin.js
CHANGED
|
@@ -21,7 +21,7 @@ const nonHtml = {
|
|
|
21
21
|
ansiColors: true
|
|
22
22
|
};
|
|
23
23
|
const html = { g: true };
|
|
24
|
-
let
|
|
24
|
+
let mode = "nonHtml";
|
|
25
25
|
const toHashTable = (dict) => {
|
|
26
26
|
const result = {};
|
|
27
27
|
for (const [options, callback] of dict)
|
|
@@ -36,6 +36,12 @@ const optionDict = toHashTable([
|
|
|
36
36
|
general.abc = ALPHABET.LATIN;
|
|
37
37
|
}
|
|
38
38
|
],
|
|
39
|
+
[
|
|
40
|
+
["--latin-ji", "-lj"],
|
|
41
|
+
() => {
|
|
42
|
+
general.abc = ALPHABET.LATIN_JI;
|
|
43
|
+
}
|
|
44
|
+
],
|
|
39
45
|
[
|
|
40
46
|
["--arabic", "-a"],
|
|
41
47
|
() => {
|
|
@@ -88,7 +94,13 @@ const optionDict = toHashTable([
|
|
|
88
94
|
[
|
|
89
95
|
["--html", "-html"],
|
|
90
96
|
() => {
|
|
91
|
-
|
|
97
|
+
mode = "html";
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
["--alphabet-only", "-abc"],
|
|
102
|
+
() => {
|
|
103
|
+
mode = "alphabetOnly";
|
|
92
104
|
}
|
|
93
105
|
]
|
|
94
106
|
]);
|
|
@@ -115,6 +127,10 @@ if (process.argv.length) {
|
|
|
115
127
|
}
|
|
116
128
|
const taraskevizer = new Taraskevizer({ general, html, nonHtml });
|
|
117
129
|
process.stdout.write(
|
|
118
|
-
|
|
130
|
+
{
|
|
131
|
+
nonHtml: taraskevizer.convert,
|
|
132
|
+
html: taraskevizer.convertToHtml,
|
|
133
|
+
alphabetOnly: taraskevizer.convertAlphabetOnly
|
|
134
|
+
}[mode].apply(taraskevizer, [text]) + "\n"
|
|
119
135
|
);
|
|
120
136
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taraskevizer",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"author": "GooseOb",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsup --config build-config/index.ts",
|
|
43
43
|
"build:bun_EXPERIMENTAL": "bun ./build-config/bun.ts",
|
|
44
|
-
"dev": "
|
|
45
|
-
"dev:bun": "
|
|
46
|
-
"dev-bun": "
|
|
44
|
+
"dev": "esrun --watch=src/*,test/*,bin/* --send-code-mode=temporaryFile test",
|
|
45
|
+
"dev:bun": "bun ./test/bun-watch.ts",
|
|
46
|
+
"dev-bun": "bun test --watch",
|
|
47
47
|
"test": "esrun --send-code-mode=temporaryFile test",
|
|
48
|
+
"test-cli": "bun run build && esrun --send-code-mode=temporaryFile test",
|
|
48
49
|
"prepare": "husky install",
|
|
49
50
|
"typecheck": "tsc --project src/tsconfig.json"
|
|
50
51
|
},
|