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

@@ -0,0 +1,2 @@
/** @type {import('lint-staged').Config} */
module.exports = require('../../.lintstagedrc.json');

View File

@@ -1 +0,0 @@
export * from '../../.lintstagedrc.json' assert { type: 'json' };

View File

@@ -0,0 +1,2 @@
/** @type {import('prettier').Config} */
module.exports = require('../../.prettierrc.json');

View File

@@ -1 +0,0 @@
export * from '../../.prettierrc.json' assert { type: 'json' };

View File

@@ -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,
});

View File

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

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;

View File

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

View File

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

View File

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

View File

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