mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
build: multi-config build and dep update
This commit is contained in:
2
packages/create-discord-bot/.lintstagedrc.cjs
Normal file
2
packages/create-discord-bot/.lintstagedrc.cjs
Normal file
@@ -0,0 +1,2 @@
|
||||
/** @type {import('lint-staged').Config} */
|
||||
module.exports = require('../../.lintstagedrc.json');
|
||||
@@ -1 +0,0 @@
|
||||
export * from '../../.lintstagedrc.json' assert { type: 'json' };
|
||||
2
packages/create-discord-bot/.prettierrc.cjs
Normal file
2
packages/create-discord-bot/.prettierrc.cjs
Normal file
@@ -0,0 +1,2 @@
|
||||
/** @type {import('prettier').Config} */
|
||||
module.exports = require('../../.prettierrc.json');
|
||||
@@ -1 +0,0 @@
|
||||
export * from '../../.prettierrc.json' assert { type: 'json' };
|
||||
@@ -101,4 +101,9 @@ if (!deno && typescript === undefined && javascript === undefined) {
|
||||
typescript = useTypescript;
|
||||
}
|
||||
|
||||
await createDiscordBot({ typescript, directory: projectDirectory, packageManager, installPackages });
|
||||
await createDiscordBot({
|
||||
typescript,
|
||||
directory: projectDirectory,
|
||||
packageManager,
|
||||
installPackages,
|
||||
});
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier": "^3.1.0",
|
||||
"terser": "^5.24.0",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "^5.2.2",
|
||||
|
||||
@@ -67,7 +67,9 @@ export async function createDiscordBot({ directory, installPackages, typescript,
|
||||
|
||||
process.chdir(root);
|
||||
|
||||
const newVSCodeSettings = await readFile('./.vscode/settings.json', { encoding: 'utf8' }).then((str) => {
|
||||
const newVSCodeSettings = await readFile('./.vscode/settings.json', {
|
||||
encoding: 'utf8',
|
||||
}).then((str) => {
|
||||
let newStr = str.replace('[REPLACE_ME]', deno || bun ? 'auto' : packageManager);
|
||||
if (deno) {
|
||||
// @ts-expect-error: This is fine
|
||||
@@ -87,7 +89,9 @@ export async function createDiscordBot({ directory, installPackages, typescript,
|
||||
}
|
||||
|
||||
if (!deno) {
|
||||
const newPackageJSON = await readFile('./package.json', { encoding: 'utf8' }).then((str) => {
|
||||
const newPackageJSON = await readFile('./package.json', {
|
||||
encoding: 'utf8',
|
||||
}).then((str) => {
|
||||
let newStr = str.replace('[REPLACE_ME]', directoryName);
|
||||
newStr = newStr.replaceAll('[REPLACE_IMPORT_EXT]', typescript ? 'ts' : 'js');
|
||||
return newStr;
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.3"
|
||||
"prettier": "^3.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.3"
|
||||
"prettier": "^3.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier": "^3.1.0",
|
||||
"typescript": "^5.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user