Merge branch 'dev' into 'main'

Updated dev and build setup

See merge request illegitimate/illegitimate-bot!265
This commit is contained in:
2024-08-21 22:45:43 +00:00
4 changed files with 16 additions and 3 deletions

View File

@@ -15,4 +15,5 @@ Dockerfile
Dockerfile.cache Dockerfile.cache
eslint.config.mjs eslint.config.mjs
nodemon-js.json nodemon-js.json
nodemon-swc.json
nodemon.json nodemon.json

View File

@@ -8,7 +8,6 @@
], ],
"verbose": true, "verbose": true,
"env": { "env": {
"NODE_PATH": "dist/",
"NODE_ENV": "dev" "NODE_ENV": "dev"
}, },
"ext": "js" "ext": "js"

12
nodemon-swc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"ignore": [
".git",
"node_modules",
"data"
],
"env": {
"NODE_ENV": "dev"
},
"ext": "ts",
"exec": "yarn build && yarn start"
}

View File

@@ -12,8 +12,9 @@
"scripts": { "scripts": {
"start": "node dist/index.js", "start": "node dist/index.js",
"build": "swc src -d dist --strip-leading-paths", "build": "swc src -d dist --strip-leading-paths",
"watch": "swc src -d dist --watch", "watch": "swc src -d dist --strip-leading-paths --watch",
"dev": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"", "dev": "nodemon --config nodemon-swc.json",
"dev:conc": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"",
"dev:ts": "nodemon --config nodemon.json src/index.ts", "dev:ts": "nodemon --config nodemon.json src/index.ts",
"dev:js": "nodemon --config nodemon-js.json dist/index.js", "dev:js": "nodemon --config nodemon-js.json dist/index.js",
"check": "tsc --noEmit", "check": "tsc --noEmit",