Minor updates
This commit is contained in:
parent
4938b2522a
commit
6f14e314e8
10
index.js
10
index.js
@ -89,16 +89,16 @@ const argvProcessList = process.argv.at(-1);
|
|||||||
|
|
||||||
const processesFilePath = path.resolve(process.cwd(), "batchrun.config.json");
|
const processesFilePath = path.resolve(process.cwd(), "batchrun.config.json");
|
||||||
|
|
||||||
if (argvProcessList) {
|
if (fs.existsSync(processesFilePath)) {
|
||||||
const processesArray = argvProcessList.split(",");
|
const processesFile = fs.readFileSync(processesFilePath, "utf8");
|
||||||
|
const processesArray = JSON.parse(processesFile);
|
||||||
for (let i = 0; i < processesArray.length; i++) {
|
for (let i = 0; i < processesArray.length; i++) {
|
||||||
const processString = processesArray[i];
|
const processString = processesArray[i];
|
||||||
const strippedProcessString = processString.trim();
|
const strippedProcessString = processString.trim();
|
||||||
processesStrings.push(strippedProcessString);
|
processesStrings.push(strippedProcessString);
|
||||||
}
|
}
|
||||||
} else if (fs.existsSync(processesFilePath)) {
|
} else if (argvProcessList) {
|
||||||
const processesFile = fs.readFileSync(processesFilePath, "utf8");
|
const processesArray = argvProcessList.split(",");
|
||||||
const processesArray = JSON.parse(processesFile);
|
|
||||||
for (let i = 0; i < processesArray.length; i++) {
|
for (let i = 0; i < processesArray.length; i++) {
|
||||||
const processString = processesArray[i];
|
const processString = processesArray[i];
|
||||||
const strippedProcessString = processString.trim();
|
const strippedProcessString = processString.trim();
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "batch-run",
|
"name": "batch-run",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Run and manage multiple processes concurrently in one terminal",
|
"description": "Run and manage multiple processes concurrently in one terminal",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"batch-run": "index.js"
|
"batch-run": "index.js"
|
||||||
},
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/BenjaminToby/batch-run"
|
||||||
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"process",
|
"process",
|
||||||
"batch",
|
"batch",
|
||||||
|
Loading…
Reference in New Issue
Block a user