From 1a8d8411a77dac77112960d80a3c4ec14011ad08 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 9 Jun 2024 11:08:44 -0700 Subject: [PATCH] tsconfig: Enable composite. This allows TypeScript to use incremental compilation by default. Signed-off-by: Anders Kaseorg --- .gitignore | 1 + tsconfig.json | 3 +++ web/shared/package.json | 2 +- web/shared/tsconfig.json | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d5c2f2f699..4f63471ede 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ ## Byproducts of setting up and using the dev environment *.pyc +*.tsbuildinfo package-lock.json /.vagrant diff --git a/tsconfig.json b/tsconfig.json index 51e4c368b6..534620cd2f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,9 @@ /* Language and Environment */ "target": "ESNext", + + /* Projects */ + "composite": true, }, "exclude": [ // Type stubs are not part of the top-level project. diff --git a/web/shared/package.json b/web/shared/package.json index fdeb639eee..40c863b1d5 100644 --- a/web/shared/package.json +++ b/web/shared/package.json @@ -3,7 +3,7 @@ "version": "0.0.18", "license": "Apache-2.0", "scripts": { - "prepare": "rm -rf lib && tsc && cp src/*.flow lib", + "prepare": "tsc --build --clean && rm -rf lib && tsc && cp src/*.flow lib", "version": "tools/npm-version", "postversion": "tools/npm-postversion" }, diff --git a/web/shared/tsconfig.json b/web/shared/tsconfig.json index 431a4a6165..f7abc5c80a 100644 --- a/web/shared/tsconfig.json +++ b/web/shared/tsconfig.json @@ -29,6 +29,9 @@ /* Language and Environment */ "target": "esnext", + + /* Projects */ + "composite": true, }, "include": ["src"], }