From fd09282ed77abfa0e0f7778f5aac4dcee098129c Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Wed, 17 Nov 2021 20:29:26 +0700 Subject: [PATCH] Build watch mode (#318) Signed-off-by: Andrey Sobolev --- common/config/rush/command-line.json | 10 ++++++++++ dev/account/package.json | 1 + dev/client-resources/package.json | 1 + dev/server-chunter-resources/package.json | 1 + dev/server/package.json | 1 + dev/storage/package.json | 1 + dev/tool/package.json | 1 + models/all/package.json | 1 + models/chunter/package.json | 1 + models/contact/package.json | 1 + models/core/package.json | 1 + models/demo/package.json | 1 + models/recruit/package.json | 1 + models/server-chunter/package.json | 1 + models/server-core/package.json | 1 + models/server-recruit/package.json | 1 + models/server-view/package.json | 1 + models/task/package.json | 1 + models/view/package.json | 1 + models/workbench/package.json | 1 + packages/core/package.json | 1 + packages/model/package.json | 1 + packages/platform/package.json | 1 + packages/query/package.json | 1 + plugins/chunter/package.json | 1 + plugins/client-resources/package.json | 1 + plugins/client/package.json | 1 + plugins/contact/package.json | 1 + plugins/login/package.json | 1 + plugins/recruit/package.json | 1 + plugins/task/package.json | 1 + plugins/view/package.json | 1 + plugins/workbench/package.json | 1 + pods/account/package.json | 1 + server/account/package.json | 1 + server/chunter-resources/package.json | 1 + server/chunter/package.json | 1 + server/contrib/package.json | 1 + server/core/package.json | 1 + server/elastic/package.json | 1 + server/front/package.json | 1 + server/mongo/package.json | 1 + server/recruit-resources/package.json | 1 + server/recruit/package.json | 1 + server/upload/package.json | 1 + server/view-resources/package.json | 1 + server/view/package.json | 1 + server/workspace/package.json | 1 + server/ws/package.json | 1 + 49 files changed, 58 insertions(+) diff --git a/common/config/rush/command-line.json b/common/config/rush/command-line.json index 9d1bcdc2c7..00261fe7b1 100644 --- a/common/config/rush/command-line.json +++ b/common/config/rush/command-line.json @@ -166,6 +166,16 @@ // */ // // "autoinstallerName": "my-task" // } + { + "commandKind": "bulk", + "name": "build:watch", + "summary": "Build and watch", + "description": "Perform build with tsc and watch for changes with rush", + "enableParallelism": true, + "incremental": true, + "ignoreMissingScript": true, + "watchForChanges": true + }, ], /** diff --git a/dev/account/package.json b/dev/account/package.json index 43af980563..5efa5ddc2c 100644 --- a/dev/account/package.json +++ b/dev/account/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/dev/client-resources/package.json b/dev/client-resources/package.json index c11e1bba69..f450d439b2 100644 --- a/dev/client-resources/package.json +++ b/dev/client-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/dev/server-chunter-resources/package.json b/dev/server-chunter-resources/package.json index 5cc6331726..aea3bb03d5 100644 --- a/dev/server-chunter-resources/package.json +++ b/dev/server-chunter-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/dev/server/package.json b/dev/server/package.json index cb81dce629..04a49691d5 100644 --- a/dev/server/package.json +++ b/dev/server/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "start": "ts-node src/__start.ts" }, diff --git a/dev/storage/package.json b/dev/storage/package.json index 36cfbe1f49..d470afb1ea 100644 --- a/dev/storage/package.json +++ b/dev/storage/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/dev/tool/package.json b/dev/tool/package.json index 8b46a7387f..8b4fc01968 100644 --- a/dev/tool/package.json +++ b/dev/tool/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "start": "ts-node src/index.ts", "bundle": "esbuild src/index.ts --bundle --minify --platform=node > bundle.js", diff --git a/models/all/package.json b/models/all/package.json index ba06142731..da407b388b 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "genmodel": "ts-node src/__genmodel.ts" }, diff --git a/models/chunter/package.json b/models/chunter/package.json index 54c1e61d3f..1b8c2d7669 100644 --- a/models/chunter/package.json +++ b/models/chunter/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/contact/package.json b/models/contact/package.json index cc7089e923..6313fb9b45 100644 --- a/models/contact/package.json +++ b/models/contact/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/core/package.json b/models/core/package.json index bc0797eae8..342f4d3eae 100644 --- a/models/core/package.json +++ b/models/core/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/demo/package.json b/models/demo/package.json index 53fa6c03de..2615030d17 100644 --- a/models/demo/package.json +++ b/models/demo/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/recruit/package.json b/models/recruit/package.json index 1041b86c97..37975ef51d 100644 --- a/models/recruit/package.json +++ b/models/recruit/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/server-chunter/package.json b/models/server-chunter/package.json index 96b7de0e45..111d1b1435 100644 --- a/models/server-chunter/package.json +++ b/models/server-chunter/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/server-core/package.json b/models/server-core/package.json index 52fd13ffc7..84162eb3a1 100644 --- a/models/server-core/package.json +++ b/models/server-core/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/server-recruit/package.json b/models/server-recruit/package.json index e732de98a3..9be05d412d 100644 --- a/models/server-recruit/package.json +++ b/models/server-recruit/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/server-view/package.json b/models/server-view/package.json index 86281460d0..57d6fc31cc 100644 --- a/models/server-view/package.json +++ b/models/server-view/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/task/package.json b/models/task/package.json index 5397bc690e..421ec64ad8 100644 --- a/models/task/package.json +++ b/models/task/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/view/package.json b/models/view/package.json index ed1e0b09cb..9369a9709c 100644 --- a/models/view/package.json +++ b/models/view/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/models/workbench/package.json b/models/workbench/package.json index c43633ea16..cd72ec4b17 100644 --- a/models/workbench/package.json +++ b/models/workbench/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 32718fb366..5f0b41bc2d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "test": "heft test", "lint:fix": "eslint --fix src" }, diff --git a/packages/model/package.json b/packages/model/package.json index 89f3d4f2eb..1f71e6ad2b 100644 --- a/packages/model/package.json +++ b/packages/model/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/packages/platform/package.json b/packages/platform/package.json index 1bb23b8866..a37d6beb55 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "test": "heft test", "lint:fix": "eslint --fix src" }, diff --git a/packages/query/package.json b/packages/query/package.json index 56f08144cd..1a525ea94b 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/chunter/package.json b/plugins/chunter/package.json index efcf3b3c0c..e3c3fd7426 100644 --- a/plugins/chunter/package.json +++ b/plugins/chunter/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/client-resources/package.json b/plugins/client-resources/package.json index 08c1416a68..50bf1223dd 100644 --- a/plugins/client-resources/package.json +++ b/plugins/client-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/client/package.json b/plugins/client/package.json index be9a777e35..3424784112 100644 --- a/plugins/client/package.json +++ b/plugins/client/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/contact/package.json b/plugins/contact/package.json index 2d16c593d7..1b242e2d22 100644 --- a/plugins/contact/package.json +++ b/plugins/contact/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/login/package.json b/plugins/login/package.json index 6f15962d82..069089cfd0 100644 --- a/plugins/login/package.json +++ b/plugins/login/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/recruit/package.json b/plugins/recruit/package.json index b22b8d08df..5b32bb8a32 100644 --- a/plugins/recruit/package.json +++ b/plugins/recruit/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/task/package.json b/plugins/task/package.json index 5ba7cf7c4a..c1c3eefb5a 100644 --- a/plugins/task/package.json +++ b/plugins/task/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/view/package.json b/plugins/view/package.json index f0819e536f..8712458121 100644 --- a/plugins/view/package.json +++ b/plugins/view/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/plugins/workbench/package.json b/plugins/workbench/package.json index 1e94338b10..fe930ae68b 100644 --- a/plugins/workbench/package.json +++ b/plugins/workbench/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/pods/account/package.json b/pods/account/package.json index da66127eaf..8ee84edee8 100644 --- a/pods/account/package.json +++ b/pods/account/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "ts-node src/index.ts", "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "bundle": "esbuild src/index.ts --bundle --minify --platform=node > bundle.js", "docker:build": "docker build -t anticrm/account .", diff --git a/server/account/package.json b/server/account/package.json index 05e7cbd891..b1adfd0fbe 100644 --- a/server/account/package.json +++ b/server/account/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/chunter-resources/package.json b/server/chunter-resources/package.json index 840ace1ca2..8fff3195ea 100644 --- a/server/chunter-resources/package.json +++ b/server/chunter-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/chunter/package.json b/server/chunter/package.json index c89ba87d5c..2b0ce5a410 100644 --- a/server/chunter/package.json +++ b/server/chunter/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/contrib/package.json b/server/contrib/package.json index 59e6f51535..93ca1d4e0c 100644 --- a/server/contrib/package.json +++ b/server/contrib/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/core/package.json b/server/core/package.json index 6c6742fbbd..fa560e7828 100644 --- a/server/core/package.json +++ b/server/core/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/elastic/package.json b/server/elastic/package.json index 0e92654cab..fa4ae5c824 100644 --- a/server/elastic/package.json +++ b/server/elastic/package.json @@ -7,6 +7,7 @@ "scripts": { "init": "ts-node src/__init.ts", "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/front/package.json b/server/front/package.json index 96ac4e010c..6df36221fd 100644 --- a/server/front/package.json +++ b/server/front/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "bundle": "esbuild src/__start.ts --bundle --minify --platform=node > bundle.js & rm -rf ./dist && cp -r ../../dev/prod/dist . && cp -r ../../dev/prod/public/* ./dist/", "docker:build": "docker build -t anticrm/front .", diff --git a/server/mongo/package.json b/server/mongo/package.json index 5ce1b633fc..7f7ec2e2b6 100644 --- a/server/mongo/package.json +++ b/server/mongo/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/recruit-resources/package.json b/server/recruit-resources/package.json index 7e59578bb9..b4406de98b 100644 --- a/server/recruit-resources/package.json +++ b/server/recruit-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/recruit/package.json b/server/recruit/package.json index c7f1154aff..9ee0eac962 100644 --- a/server/recruit/package.json +++ b/server/recruit/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/upload/package.json b/server/upload/package.json index 8deb482a6d..601d47a882 100644 --- a/server/upload/package.json +++ b/server/upload/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "ts-node src/__start.ts", "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "bundle": "esbuild src/__start.ts --bundle --platform=node > bundle.js", "docker:build": "docker build -t anticrm/upload .", diff --git a/server/view-resources/package.json b/server/view-resources/package.json index ea7aac8bca..d023955268 100644 --- a/server/view-resources/package.json +++ b/server/view-resources/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/view/package.json b/server/view/package.json index 2b8ba18431..92c0fef1a6 100644 --- a/server/view/package.json +++ b/server/view/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src" }, "devDependencies": { diff --git a/server/workspace/package.json b/server/workspace/package.json index 85becde052..6c3d51d582 100644 --- a/server/workspace/package.json +++ b/server/workspace/package.json @@ -7,6 +7,7 @@ "scripts": { "create": "ts-node src/__create.ts", "build": "heft build", + "build:watch": "tsc", "lint:fix": "eslint --fix src", "bundle": "esbuild src/__create.ts --bundle --minify --platform=node > bundle.js", "docker:build": "docker build -t anticrm/tools .", diff --git a/server/ws/package.json b/server/ws/package.json index 4aa2ea8ecf..906a17ad1d 100644 --- a/server/ws/package.json +++ b/server/ws/package.json @@ -6,6 +6,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "build:watch": "tsc", "test": "heft test", "lint:fix": "eslint --fix src" },