From 6475e7a268794169d082a87783ec1fab32df7767 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Wed, 14 Apr 2021 01:37:30 -0700 Subject: [PATCH] Switch .gitignore back to blacklist VS Code's search feature doesn't support .gitignore whitelisting. :( (Also don't compile .d.ts files.) --- .gitignore | 10 ++++++++-- build-tools/compiler.js | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6e742d408..d4903762d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,14 @@ npm-debug.log package-lock.json /vendor/ -/js/battle.js -/js/ +/js/server/ +/js/*.js.map +/js/battle*.js +/js/panel*.js +/js/replay-embed.js +/js/client-main.js +/js/client-core.js +/js/client-connection.js /replays/caches/ /replays/replay-config.inc.php diff --git a/build-tools/compiler.js b/build-tools/compiler.js index 998c5f97f..9a1c66424 100644 --- a/build-tools/compiler.js +++ b/build-tools/compiler.js @@ -127,6 +127,7 @@ function compileToDir(srcDir, destDir, opts = {}) { if (!relative.endsWith('.ts') && !relative.endsWith('.tsx')) { return 0; } + if (relative.endsWith('.d.ts')) return 0; relative = relative.slice(0, relative.endsWith('.tsx') ? -4 : -3) + '.js';