Switch .gitignore back to blacklist

VS Code's search feature doesn't support .gitignore whitelisting. :(

(Also don't compile .d.ts files.)
This commit is contained in:
Guangcong Luo 2021-04-14 01:37:30 -07:00
parent 31fcd418ec
commit 6475e7a268
2 changed files with 9 additions and 2 deletions

10
.gitignore vendored
View File

@ -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

View File

@ -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';