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
|
.env.example
|
||||||
.gitignore
|
.gitignore
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml
|
||||||
|
.node-version
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
Dockerfile
|
Dockerfile
|
||||||
Dockerfile.cache
|
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",
|
"restartable": "rs",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
".git",
|
".git",
|
||||||
"node_modules/**/node_modules",
|
"node_modules",
|
||||||
"src",
|
"src",
|
||||||
"data"
|
"data"
|
||||||
],
|
],
|
||||||
@@ -11,5 +11,5 @@
|
|||||||
"NODE_PATH": "dist/",
|
"NODE_PATH": "dist/",
|
||||||
"NODE_ENV": "dev"
|
"NODE_ENV": "dev"
|
||||||
},
|
},
|
||||||
"ext": "js, json"
|
"ext": "js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"restartable": "rs",
|
"restartable": "rs",
|
||||||
"ignore": [
|
"ignore": [
|
||||||
".git",
|
".git",
|
||||||
"node_modules/**/node_modules",
|
"node_modules",
|
||||||
"data"
|
"data"
|
||||||
],
|
],
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
@@ -13,5 +13,5 @@
|
|||||||
"TS_NODE_FILES": "true",
|
"TS_NODE_FILES": "true",
|
||||||
"TS_NODE_TRANSPILE_ONLY": "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",
|
"homepage": "https://gitlab.com/illegitimate/illegitimate-bot",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node dist/index.js",
|
"start": "node dist/index.js",
|
||||||
"build": "tsc",
|
"build": "swc src -d dist --strip-leading-paths",
|
||||||
"watch": "tsc -w",
|
"watch": "swc src -d dist --watch",
|
||||||
"dev": "conc --names \"TSC,BOT\" --prefix-colors \"blue, magenta\" \"tsc -w\" \"yarn dev:js\"",
|
"dev": "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",
|
||||||
"dev:build": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"",
|
"check": "tsc --noEmit",
|
||||||
"dev:delete": "ts-node scripts/delete-commands.ts",
|
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"lint:fix": "eslint --fix",
|
"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",
|
"author": "Taken",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
@@ -46,11 +47,14 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3.1.0",
|
"@eslint/eslintrc": "^3.1.0",
|
||||||
"@eslint/js": "^9.9.0",
|
"@eslint/js": "^9.9.0",
|
||||||
|
"@swc/cli": "^0.4.0",
|
||||||
|
"@swc/core": "^1.7.14",
|
||||||
"@types/ms": "^0.7.34",
|
"@types/ms": "^0.7.34",
|
||||||
"@types/node": "^22.4.1",
|
"@types/node": "^22.4.1",
|
||||||
"@types/pg": "^8",
|
"@types/pg": "^8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
||||||
"@typescript-eslint/parser": "^8.2.0",
|
"@typescript-eslint/parser": "^8.2.0",
|
||||||
|
"chokidar": "^3.6.0",
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^9.9.0",
|
"eslint": "^9.9.0",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
"schemas/*": ["src/schemas/*"],
|
"schemas/*": ["src/schemas/*"],
|
||||||
"config/*": ["src/config/*"],
|
"config/*": ["src/config/*"],
|
||||||
"interfaces": ["src/interfaces/index"],
|
"interfaces": ["src/interfaces/index"],
|
||||||
"typings": ["src/typings/index"],
|
"typings": ["src/typings/index"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
|
|||||||
Reference in New Issue
Block a user