Merge branch 'dev' into 'main'
Added swc for transpiling typescript See merge request illegitimate/illegitimate-bot!263
This commit is contained in:
@@ -9,6 +9,7 @@ scripts
|
||||
.env.example
|
||||
.gitignore
|
||||
.gitlab-ci.yml
|
||||
.node-version
|
||||
docker-compose.yml
|
||||
Dockerfile
|
||||
Dockerfile.cache
|
||||
|
||||
1
.node-version
Normal file
1
.node-version
Normal file
@@ -0,0 +1 @@
|
||||
21.7.3
|
||||
33
.swcrc
Normal file
33
.swcrc
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"tsx": false,
|
||||
"dynamicImport": true,
|
||||
"decorators": false
|
||||
},
|
||||
"target": "es2022",
|
||||
"loose": false,
|
||||
"externalHelpers": false,
|
||||
"keepClassNames": false,
|
||||
"preserveAllComments": false,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"utils/*": ["src/utils/*"],
|
||||
"schemas/*": ["src/schemas/*"],
|
||||
"config/*": ["src/config/*"],
|
||||
"interfaces": ["src/interfaces/index"],
|
||||
"typings": ["src/typings/index"]
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs",
|
||||
"strict": true,
|
||||
"strictMode": true,
|
||||
"noInterop": false,
|
||||
"lazy": false
|
||||
},
|
||||
"minify": false,
|
||||
"sourceMaps": false
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"restartable": "rs",
|
||||
"ignore": [
|
||||
".git",
|
||||
"node_modules/**/node_modules",
|
||||
"node_modules",
|
||||
"src",
|
||||
"data"
|
||||
],
|
||||
@@ -11,5 +11,5 @@
|
||||
"NODE_PATH": "dist/",
|
||||
"NODE_ENV": "dev"
|
||||
},
|
||||
"ext": "js, json"
|
||||
"ext": "js"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"restartable": "rs",
|
||||
"ignore": [
|
||||
".git",
|
||||
"node_modules/**/node_modules",
|
||||
"node_modules",
|
||||
"data"
|
||||
],
|
||||
"verbose": true,
|
||||
@@ -13,5 +13,5 @@
|
||||
"TS_NODE_FILES": "true",
|
||||
"TS_NODE_TRANSPILE_ONLY": "true"
|
||||
},
|
||||
"ext": "ts, json"
|
||||
"ext": "ts"
|
||||
}
|
||||
|
||||
16
package.json
16
package.json
@@ -11,16 +11,17 @@
|
||||
"homepage": "https://gitlab.com/illegitimate/illegitimate-bot",
|
||||
"scripts": {
|
||||
"start": "node dist/index.js",
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"dev": "conc --names \"TSC,BOT\" --prefix-colors \"blue, magenta\" \"tsc -w\" \"yarn dev:js\"",
|
||||
"build": "swc src -d dist --strip-leading-paths",
|
||||
"watch": "swc src -d dist --watch",
|
||||
"dev": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"",
|
||||
"dev:ts": "nodemon --config nodemon.json src/index.ts",
|
||||
"dev:js": "nodemon --config nodemon-js.json dist/index.js",
|
||||
"dev:build": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"",
|
||||
"dev:delete": "ts-node scripts/delete-commands.ts",
|
||||
"check": "tsc --noEmit",
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"prod:build": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\""
|
||||
"push:prod": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\"",
|
||||
"push:dev": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"",
|
||||
"delete:dev": "ts-node scripts/delete-commands.ts"
|
||||
},
|
||||
"author": "Taken",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -46,11 +47,14 @@
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.1.0",
|
||||
"@eslint/js": "^9.9.0",
|
||||
"@swc/cli": "^0.4.0",
|
||||
"@swc/core": "^1.7.14",
|
||||
"@types/ms": "^0.7.34",
|
||||
"@types/node": "^22.4.1",
|
||||
"@types/pg": "^8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
||||
"@typescript-eslint/parser": "^8.2.0",
|
||||
"chokidar": "^3.6.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.9.0",
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"schemas/*": ["src/schemas/*"],
|
||||
"config/*": ["src/config/*"],
|
||||
"interfaces": ["src/interfaces/index"],
|
||||
"typings": ["src/typings/index"],
|
||||
"typings": ["src/typings/index"]
|
||||
}
|
||||
},
|
||||
"include": ["src"],
|
||||
|
||||
Reference in New Issue
Block a user