mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +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:
@@ -0,0 +1 @@
|
||||
pnpm-lock.yaml
|
||||
@@ -2,7 +2,6 @@
|
||||
"recommendations": [
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"tamasfe.even-better-toml",
|
||||
"codezombiech.gitignore",
|
||||
"christian-kohler.npm-intellisense",
|
||||
"christian-kohler.path-intellisense"
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
"editor.trimAutoWhitespace": false,
|
||||
"files.insertFinalNewline": true,
|
||||
"files.eol": "\n",
|
||||
"npm.packageManager": "[REPLACE_ME]"
|
||||
"npm.packageManager": "[REPLACE_PACKAGE_MANAGER]"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "[REPLACE_ME]",
|
||||
"name": "@discordjs/template-javascript",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { glob, stat } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
import { basename, resolve } from 'node:path';
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { predicate as commandPredicate } from '../commands/index.js';
|
||||
import { predicate as eventPredicate } from '../events/index.js';
|
||||
@@ -40,7 +40,7 @@ export async function loadStructures(dir, predicate, recursive = true) {
|
||||
// Loop through all the matching files in the directory
|
||||
for await (const file of glob(pattern)) {
|
||||
// If the file is index.js, skip the file
|
||||
if (file.endsWith('/index.js')) {
|
||||
if (basename(file) === 'index.js') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user