From 9d5a00eeea2602a982cd2df7611c538c3f36d29b Mon Sep 17 00:00:00 2001 From: Sean Knox Date: Tue, 2 Feb 2021 11:44:03 -0800 Subject: [PATCH 1/2] Add option to watch and serve changes --- templates/basic-ts/package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/basic-ts/package.json b/templates/basic-ts/package.json index 8bfde2bf8c..a0ab77acba 100644 --- a/templates/basic-ts/package.json +++ b/templates/basic-ts/package.json @@ -14,7 +14,10 @@ "scripts": { "build": "tsc", "start": "probot run ./lib/index.js", - "test": "jest" + "test": "jest", + "watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"", + "watch-node": "probot run ./lib/index.js", + "watch-ts": "tsc -w" }, "dependencies": { "probot": "^11.0.1" @@ -22,6 +25,7 @@ "devDependencies": { "@types/jest": "^26.0.19", "@types/node": "^14.14.19", + "concurrently": "^5.3.0", "jest": "^26.6.3", "nock": "^13.0.5", "smee-client": "^1.2.2", From cea0bfeeccce7b8037eb467fc4efebc5e1c2e032 Mon Sep 17 00:00:00 2001 From: Sean Knox Date: Tue, 2 Feb 2021 11:49:42 -0800 Subject: [PATCH 2/2] support watching test files --- templates/basic-ts/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/basic-ts/package.json b/templates/basic-ts/package.json index a0ab77acba..470cd37c08 100644 --- a/templates/basic-ts/package.json +++ b/templates/basic-ts/package.json @@ -17,6 +17,7 @@ "test": "jest", "watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"", "watch-node": "probot run ./lib/index.js", + "watch-test": "npm run test -- --watchAll", "watch-ts": "tsc -w" }, "dependencies": {