From 6f14e314e8848964f28d1650ded73f90037a1e6d Mon Sep 17 00:00:00 2001 From: Tben Date: Thu, 17 Aug 2023 16:55:25 +0100 Subject: [PATCH] Minor updates --- index.js | 10 +++++----- package.json | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 6de91b9..954e6f9 100644 --- a/index.js +++ b/index.js @@ -89,16 +89,16 @@ const argvProcessList = process.argv.at(-1); const processesFilePath = path.resolve(process.cwd(), "batchrun.config.json"); -if (argvProcessList) { - const processesArray = argvProcessList.split(","); +if (fs.existsSync(processesFilePath)) { + const processesFile = fs.readFileSync(processesFilePath, "utf8"); + const processesArray = JSON.parse(processesFile); for (let i = 0; i < processesArray.length; i++) { const processString = processesArray[i]; const strippedProcessString = processString.trim(); processesStrings.push(strippedProcessString); } -} else if (fs.existsSync(processesFilePath)) { - const processesFile = fs.readFileSync(processesFilePath, "utf8"); - const processesArray = JSON.parse(processesFile); +} else if (argvProcessList) { + const processesArray = argvProcessList.split(","); for (let i = 0; i < processesArray.length; i++) { const processString = processesArray[i]; const strippedProcessString = processString.trim(); diff --git a/package.json b/package.json index 6e0b57f..f5dcc99 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,15 @@ { "name": "batch-run", - "version": "1.0.0", + "version": "1.0.1", "description": "Run and manage multiple processes concurrently in one terminal", "main": "index.js", "bin": { "batch-run": "index.js" }, + "repository": { + "type": "git", + "url": "https://github.com/BenjaminToby/batch-run" + }, "keywords": [ "process", "batch",