From 25de98fbdaa9788f126ff5e344373428731ef155 Mon Sep 17 00:00:00 2001 From: Isaac Levy Date: Wed, 31 Jul 2019 11:33:05 -0400 Subject: [PATCH] Improve typescript sourcemaps Inline sources allows browserify to sourcemap back to original typescript. If you add the ui folder to chrome, you can then edit ts files and set ts breakpoints directly in the browser! --- ui/ceval/tsconfig.json | 3 +-- ui/chat/tsconfig.json | 3 +-- ui/chess/tsconfig.json | 3 +-- ui/common/tsconfig.json | 3 +-- ui/game/tsconfig.json | 3 +-- ui/nvui/tsconfig.json | 3 +-- ui/tree/tsconfig.json | 3 +-- ui/tsconfig_module.base.json | 8 ++++++++ 8 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 ui/tsconfig_module.base.json diff --git a/ui/ceval/tsconfig.json b/ui/ceval/tsconfig.json index 6357e0c1f1..74873b8704 100644 --- a/ui/ceval/tsconfig.json +++ b/ui/ceval/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts", "test/*.ts"], "compilerOptions": { "outDir": "./dist", "rootDir": ".", - "declaration": true } } diff --git a/ui/chat/tsconfig.json b/ui/chat/tsconfig.json index aa8b0b7052..1d91776a6f 100644 --- a/ui/chat/tsconfig.json +++ b/ui/chat/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts"], "compilerOptions": { "outDir": "./dist", - "declaration": true, "noEmitOnError": false } } diff --git a/ui/chess/tsconfig.json b/ui/chess/tsconfig.json index 87d53995fd..36b5dab793 100644 --- a/ui/chess/tsconfig.json +++ b/ui/chess/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts"], "compilerOptions": { "outDir": "./dist", - "declaration": true } } diff --git a/ui/common/tsconfig.json b/ui/common/tsconfig.json index 5f3fb9ac4b..dd1c20bd47 100644 --- a/ui/common/tsconfig.json +++ b/ui/common/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts"], "compilerOptions": { "outDir": "./", - "declaration": true } } diff --git a/ui/game/tsconfig.json b/ui/game/tsconfig.json index 9b0766a55f..c6129a0639 100644 --- a/ui/game/tsconfig.json +++ b/ui/game/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/**/*.ts"], "compilerOptions": { "outDir": "./", - "declaration": true } } diff --git a/ui/nvui/tsconfig.json b/ui/nvui/tsconfig.json index 5f3fb9ac4b..dd1c20bd47 100644 --- a/ui/nvui/tsconfig.json +++ b/ui/nvui/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts"], "compilerOptions": { "outDir": "./", - "declaration": true } } diff --git a/ui/tree/tsconfig.json b/ui/tree/tsconfig.json index 87d53995fd..36b5dab793 100644 --- a/ui/tree/tsconfig.json +++ b/ui/tree/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig_module.base.json", "include": ["src/*.ts"], "compilerOptions": { "outDir": "./dist", - "declaration": true } } diff --git a/ui/tsconfig_module.base.json b/ui/tsconfig_module.base.json new file mode 100644 index 0000000000..5f2fd3d6d6 --- /dev/null +++ b/ui/tsconfig_module.base.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "declaration": true, + "inlineSourceMap": true, + "inlineSources": true + } +}