Updated folder structure

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2024-09-26 11:12:47 +02:00
parent 5b8a1ef349
commit 1698ed1e80
8 changed files with 24 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
.git
.yarn
.nodemon
dev
dist
old
node_modules
@@ -12,9 +13,5 @@ scripts
.node-version
docker-compose.yml
Dockerfile
Dockerfile.cache
dprint.json
eslint.config.mjs
nodemon-js.json
nodemon-swc.json
nodemon.json
eslint.config.mjs

2
.gitignore vendored
View File

@@ -1,7 +1,5 @@
.vscode/
.yarn/
node_modules/*
.env
dist/
data/
dev/

14
.nodemon/debug.json Normal file
View File

@@ -0,0 +1,14 @@
{
"$schema": "https://json.schemastore.org/nodemon.json",
"restartable": "rs",
"ignore": [
"node_modules"
],
"verbose": true,
"env": {
"NODE_ENV": "dev",
"TYPESCRIPT": "true"
},
"ext": "ts",
"exec": "tsx --inspect-brk"
}

View File

@@ -15,9 +15,10 @@
"start": "node dist/index.js",
"build": "swc src -d dist --strip-leading-paths",
"watch": "swc src -d dist --strip-leading-paths --watch",
"dev": "nodemon --config nodemon-swc.json",
"dev:ts": "nodemon --config nodemon.json src/index.ts",
"dev:js": "nodemon --config nodemon-js.json dist/index.js",
"dev": "nodemon --config .nodemon/swc.json",
"dev:ts": "nodemon --config .nodemon/ts.json src/index.ts",
"dev:ts:inspect": "nodemon --config .nodemon/debug.json src/index.ts",
"dev:js": "nodemon --config .nodemon/js.json dist/index.js",
"format": "dprint fmt \"**/*.ts\"",
"check": "pnpm tscheck && pnpm lint",
"tscheck": "tsc && echo \"TypeScript check passed!\"",

View File

@@ -17,7 +17,7 @@ let sequelize: Sequelize
if (process.env.NODE_ENV === "dev") {
sequelize = new Sequelize({
dialect: "sqlite",
storage: "data/db.sqlite"
storage: "dev/db.sqlite"
})
} else {
sequelize = new Sequelize(env.prod.postgresURI, { dialect: "postgres" })
@@ -75,11 +75,11 @@ class Illegitimate {
}
private loadMethods() {
String.prototype.removeIndents = function(this: string) {
String.prototype.removeIndents = function (this: string) {
return this.replace(/^ */gm, "")
}
String.prototype.capitalizeFirstLetter = function(this: string) {
String.prototype.capitalizeFirstLetter = function (this: string) {
return this[0].toUpperCase() + this.slice(1).toLowerCase()
}
}