summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 18:21:17 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 18:21:17 +0200
commit1bef11aaaa23334df105b8e62cf919194a59dc43 (patch)
tree96ed878170cb5b52c532f9ed7d392551cce21a9f /api
parent:zap: fast build script (diff)
downloadserver-1bef11aaaa23334df105b8e62cf919194a59dc43.tar.xz
:bug: fix swc config
Diffstat (limited to 'api')
-rw-r--r--api/.swcrc21
-rw-r--r--api/jsconfig.json11
-rw-r--r--api/package.json6
3 files changed, 16 insertions, 22 deletions
diff --git a/api/.swcrc b/api/.swcrc

index f04801b8..41d8f80f 100644 --- a/api/.swcrc +++ b/api/.swcrc
@@ -1,9 +1,14 @@ { - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021" - } -} \ No newline at end of file + "jsc": { + "parser": { + "syntax": "typescript", + "decorators": true + }, + "target": "es2021", + "baseUrl": ".", + "paths": { + "@fosscord/api": ["src/index"], + "@fosscord/api/*": ["src/*"] + } + } +} diff --git a/api/jsconfig.json b/api/jsconfig.json deleted file mode 100644
index 41c4cb9a..00000000 --- a/api/jsconfig.json +++ /dev/null
@@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@util/*": ["./src/util/*"], - "@middlewares/*": ["./src/middlewares/*"], - "@schema/*": ["./src/schema/*"] - } - }, - "include": ["src"] -} diff --git a/api/package.json b/api/package.json
index 37721728..eb833417 100644 --- a/api/package.json +++ b/api/package.json
@@ -2,15 +2,15 @@ "name": "@fosscord/api", "version": "1.0.0", "description": "This repository contains the HTTP API Server", - "main": "dist/Server.js", - "types": "dist/Server.d.ts", + "main": "dist/index.js", + "types": "src/index.ts", "scripts": { "test:only": "jest --coverage --verbose --forceExit ./tests", "test:routes": "jest --coverage --verbose --forceExit ./routes.test.ts", "test": "npm run build && npm run test:only", "test:watch": "jest --watch", "start": "npm run build && node dist/start", - "build": "npx tsc -b .", + "build": "npx swc src --out-dir dist", "build-docker": "tsc -p tsconfig-docker.json", "dev": "tsnd --respawn src/start.ts", "patch": "ts-patch install -s && npx patch-package",