ts-vibe 2.0.1 → 2.0.5
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/languages/en.json +1 -1
- package/languages/ru.json +2 -2
- package/package.json +1 -1
- package/src/project/index.mjs +6 -6
- package/src/project/setup.mjs +2 -2
- package/src/ts.mjs +2 -2
package/languages/en.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"enter_project_name": "Enter project name: ",
|
|
11
11
|
"name_not_valid": "Not valid",
|
|
12
12
|
"dir_is_not_empty": "Dir isn't empty. Clear? ",
|
|
13
|
-
"lint_tip": "- To lint the project: `npm lint`\n",
|
|
13
|
+
"lint_tip": "- To lint the project: `npm run lint`\n",
|
|
14
14
|
"prettier_tip": "- To format the code: `npm prettier`\n",
|
|
15
15
|
"readme_content": "# ts-vibe\n[Source code](https://github.com/yar1kpr0grammer/ts-vibe)\n\n***\n**Main file** is `src/index.ts`\n\n- To run the project: `npm start`\n",
|
|
16
16
|
"use_git": "Use git?",
|
package/languages/ru.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"enter_project_name": "Введите название проекта: ",
|
|
11
11
|
"name_not_valid": "Не правильное",
|
|
12
12
|
"dir_is_not_empty": "Папка не пуста. Очистить? ",
|
|
13
|
-
"lint_tip": "- Чтобы запустить проверку ошибок: `npm lint`\n",
|
|
14
|
-
"prettier_tip": "- Чтобы отформатировать код: `npm prettier`\n",
|
|
13
|
+
"lint_tip": "- Чтобы запустить проверку ошибок: `npm run lint`\n",
|
|
14
|
+
"prettier_tip": "- Чтобы отформатировать код: `npm run prettier`\n",
|
|
15
15
|
"readme_content": "# ts-vibe\n[Исходный код](https://github.com/yar1kpr0grammer/ts-bootstrap)\n\n***\n**Главный файл:** `src/index.ts`\n\n- Чтобы запустить проект: `npm start`\n",
|
|
16
16
|
"use_git": "Использовать git?",
|
|
17
17
|
"choose_project_template": "Выберите вариант проекта:",
|
package/package.json
CHANGED
package/src/project/index.mjs
CHANGED
|
@@ -38,7 +38,7 @@ async function setupLint(language, config) {
|
|
|
38
38
|
exec(
|
|
39
39
|
"npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-prettier",
|
|
40
40
|
),
|
|
41
|
-
"
|
|
41
|
+
"npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-prettier",
|
|
42
42
|
language.success,
|
|
43
43
|
language.error,
|
|
44
44
|
);
|
|
@@ -53,7 +53,7 @@ async function setupPrettier(language, config) {
|
|
|
53
53
|
File.create(".prettierignore", config.ignores.prettier);
|
|
54
54
|
await confirm(
|
|
55
55
|
() => exec("npm i -D prettier "),
|
|
56
|
-
"
|
|
56
|
+
"npm i -D prettier",
|
|
57
57
|
language.success,
|
|
58
58
|
language.error,
|
|
59
59
|
);
|
|
@@ -77,19 +77,19 @@ async function setupNode(language) {
|
|
|
77
77
|
await exec("npm i -D @types/node");
|
|
78
78
|
ts.addType("node");
|
|
79
79
|
},
|
|
80
|
-
"
|
|
80
|
+
"npm i -D @types/node",
|
|
81
81
|
language.success,
|
|
82
82
|
language.error,
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
export async function init(language, config) {
|
|
86
86
|
const commands = [
|
|
87
|
-
{ command: "npm init -y", message: "npm
|
|
87
|
+
{ command: "npm init -y", message: "npm init -y" },
|
|
88
88
|
{
|
|
89
89
|
command: "npm i -D typescript",
|
|
90
|
-
message: "
|
|
90
|
+
message: "npm i -D typescript",
|
|
91
91
|
},
|
|
92
|
-
{ command: "npx tsc --init", message: "init
|
|
92
|
+
{ command: "npx tsc --init", message: "npx tsc --init" },
|
|
93
93
|
];
|
|
94
94
|
|
|
95
95
|
for (const cmd of commands) {
|
package/src/project/setup.mjs
CHANGED
|
@@ -24,7 +24,7 @@ export async function getName(
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export async function chooseNodeType(language) {
|
|
27
|
-
return await radio(language.choose_node_type, ["
|
|
27
|
+
return await radio(language.choose_node_type, ["module", "commonjs"]);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export async function prepareDir(path, language) {
|
|
@@ -68,7 +68,7 @@ export async function setupProject() {
|
|
|
68
68
|
config.options = allOptions;
|
|
69
69
|
break;
|
|
70
70
|
case language.template_min:
|
|
71
|
-
config.options = [];
|
|
71
|
+
config.options = ["README.md"];
|
|
72
72
|
break;
|
|
73
73
|
case language.template_custom:
|
|
74
74
|
config.options = await checkbox(
|
package/src/ts.mjs
CHANGED
|
@@ -10,7 +10,7 @@ export function readConfig() {
|
|
|
10
10
|
|
|
11
11
|
export function updateTsConfig() {
|
|
12
12
|
if (!config) {
|
|
13
|
-
readConfig();
|
|
13
|
+
readConfig();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
if (!config) {
|
|
@@ -24,7 +24,7 @@ export function updateTsConfig() {
|
|
|
24
24
|
|
|
25
25
|
export function addType(typeName) {
|
|
26
26
|
if (!config) {
|
|
27
|
-
readConfig();
|
|
27
|
+
readConfig();
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if (!config) {
|