taraskevizer 10.1.2 → 10.1.3
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/dist/bin.js +10 -9
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4,13 +4,14 @@ const printWithPrefix = (msg) => {
|
|
|
4
4
|
process.stdout.write("[34m[taraskevizer][0m" + ' ' + msg + '\n');
|
|
5
5
|
};
|
|
6
6
|
process.argv.splice(0, 2);
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
const firstArg = process.argv[0];
|
|
8
|
+
if (firstArg) {
|
|
9
|
+
if (firstArg === '-v' || firstArg === '--version') {
|
|
10
|
+
printWithPrefix("10.1.3");
|
|
11
|
+
process.exit(0);
|
|
12
|
+
}
|
|
13
|
+
if (firstArg === '-h' || firstArg === '--help') {
|
|
14
|
+
printWithPrefix(`Usage: [34mtarask[0m [options] text
|
|
14
15
|
If text is not passed, interactive mode will be enabled
|
|
15
16
|
|
|
16
17
|
EXAMPLES
|
|
@@ -56,7 +57,8 @@ OPTIONS
|
|
|
56
57
|
[35m-nec[0m [35m--not-escape-caps[0m
|
|
57
58
|
[35m-nc[0m [35m--no-color[0m
|
|
58
59
|
`);
|
|
59
|
-
|
|
60
|
+
process.exit(0);
|
|
61
|
+
}
|
|
60
62
|
}
|
|
61
63
|
let cfg = {
|
|
62
64
|
g: true,
|
|
@@ -73,7 +75,6 @@ const toHashTable = (dict) => {
|
|
|
73
75
|
};
|
|
74
76
|
let isHtml = false;
|
|
75
77
|
const optionDict = toHashTable([
|
|
76
|
-
[['--help', '-h'], () => { }],
|
|
77
78
|
[
|
|
78
79
|
['--latin', '-l'],
|
|
79
80
|
() => {
|