Skip to content

Commit

Permalink
Merge pull request #6 from Z3rio/remove-child-process-dependency
Browse files Browse the repository at this point in the history
Remove child_process dependency
  • Loading branch information
Z3rio authored Oct 17, 2022
2 parents a22b388 + 580ffe5 commit fa08489
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
18 changes: 6 additions & 12 deletions bin/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const inquirer = require("inquirer");
const fs = require("fs");
const fse = require("fs-extra");
const exec = require("child_process").exec;
const { spawn } = require("node:child_process");

// VARIABLES
const frameworks = [
Expand Down Expand Up @@ -251,17 +251,11 @@ ui_page "html/index.html"
])
.then(async (answers3) => {
if (answers3.autoinstallmodules == true) {
exec(
"npm install",
{
cwd: `${path}/src`,
},
function (error, stdout, stderr) {
if (error) {
console.error(error);
}
}
);
spawn("npm install", {
stdio: "inherit",
shell: true,
cwd: `${path}/src`,
});
}
});
}
Expand Down
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
},
"homepage": "https://github.com/Z3rio/fivem-resource-cli#readme",
"dependencies": {
"child_process": "^1.0.2",
"fs": "^0.0.2",
"fs-extra": "^10.1.0",
"inquirer": "^8.2.4"
Expand Down

0 comments on commit fa08489

Please sign in to comment.