Added swc for transpiling typescript

This commit is contained in:
2024-08-21 17:21:54 +02:00
parent 7f33956dfb
commit bc60728735
8 changed files with 985 additions and 26 deletions

View File

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