From 481e956c3af4a72bbf92afaac5cac10052d2a644 Mon Sep 17 00:00:00 2001 From: blessedcoolant Date: Fri, 25 Mar 2022 07:31:59 +1300 Subject: [PATCH] Launch and monitor both Python and JS during development No longer need to restart python each time any change is made. nodemon will handle that now. Using concurrently because I found it to be better performant than run-p. --- lama_cleaner/app/.env | 3 ++- lama_cleaner/app/package.json | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lama_cleaner/app/.env b/lama_cleaner/app/.env index 3a85ad7..b6f760a 100644 --- a/lama_cleaner/app/.env +++ b/lama_cleaner/app/.env @@ -1 +1,2 @@ -REACT_APP_INPAINTING_URL="" \ No newline at end of file +REACT_APP_INPAINTING_URL="" +FAST_REFRESH=false \ No newline at end of file diff --git a/lama_cleaner/app/package.json b/lama_cleaner/app/package.json index ade8cbe..51b6b5d 100644 --- a/lama_cleaner/app/package.json +++ b/lama_cleaner/app/package.json @@ -29,7 +29,9 @@ "typescript": "4.x" }, "scripts": { - "dev": "run-p watch:css react-scripts:start", + "dev:python": "nodemon --watch ../../* --exec python ../../main.py", + "dev:react": "run-p watch:css react-scripts:start", + "dev": "concurrently \"yarn dev:python\" \"yarn dev:react\"", "build": "run-s build:css react-scripts:build", "test": "react-scripts test", "eject": "react-scripts eject", @@ -55,6 +57,7 @@ }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.1.0", + "concurrently": "^7.0.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -62,6 +65,7 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.26.1", "eslint-plugin-react-hooks": "^4.2.0", + "nodemon": "^2.0.15", "prettier": "^2.4.1" } }