mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat: use native node typescript (#11259)
* feat: use native node typescript * fix: use basename * Update packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change module and moduleResolution to ESNext and Bundler --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,5 +8,5 @@
|
||||
"editor.trimAutoWhitespace": false,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.eol": "\n",
|
||||
"deno.enable": "[REPLACE_BOOL]"
|
||||
"deno.enable": true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PathLike } from 'node:fs';
|
||||
import { glob, stat } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
import { basename, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import type { Command } from '../commands/index.ts';
|
||||
import { predicate as commandPredicate } from '../commands/index.ts';
|
||||
@@ -43,7 +43,7 @@ export async function loadStructures<Structure>(
|
||||
// Loop through all the matching files in the directory
|
||||
for await (const file of glob(pattern)) {
|
||||
// If the file is index.ts, skip the file
|
||||
if (file.endsWith('/index.ts')) {
|
||||
if (basename(file) === 'index.ts') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user