build: multi-config build and dep update

This commit is contained in:
iCrawl
2023-11-14 01:26:22 +01:00
parent 75fc7f2454
commit 8f432400d8
124 changed files with 566 additions and 252 deletions

View File

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