From 7fbbe796c3d9bf654de1ec7af1172a3f28fa9b43 Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Fri, 22 May 2020 06:21:10 -0700 Subject: [PATCH] Add actual watch script (#4738) --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cccce7ee6..9a3bf5c4d 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,13 @@ "scripts": { "bower": "bower install", "build": "python setup.py js css", - "build:watch": "set -e; while true; do npm run build; sleep 3; done" + "build:watch": "npm run watch", + "watch": "onchange 'notebook/static/**/!(*.min).js' 'notebook/static/**/*.less' 'bower.json' -- npm run build" }, "devDependencies": { "bower": "^1.8.8", "less": "~2", + "onchange": "^6.0.0", "po2json": "^0.4.5", "requirejs": "^2.3.6" },