🎨 use typescript plugin that converts to relative paths

This commit is contained in:
Flam3rboy
2021-09-18 01:50:20 +02:00
parent 69550e535e
commit 1e331b7c9d
16 changed files with 35 additions and 52 deletions
BIN
View File
Binary file not shown.
+3 -1
View File
@@ -4,6 +4,7 @@
"description": "",
"main": "src/start.js",
"scripts": {
"prepare": "ts-patch install -s",
"preinstall": "cd ../util && npm i && cd ../api && npm i && cd ../cdn && npm i && cd ../gateway && npm i",
"build": "npm run build:util && npm run build:api && npm run build:cdn && npm run build:gateway && npm run build:bundle",
"build:bundle": "npx tsc -b .",
@@ -12,7 +13,7 @@
"build:cdn": "cd ../cdn/ && npm run build",
"build:gateway": "cd ../gateway/ && npm run build",
"start": "npm run build && npm run start:bundle",
"start:bundle": "node -r ./tsconfig-paths-bootstrap.js dist/start.js",
"start:bundle": "node dist/start.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
@@ -43,6 +44,7 @@
"@types/uuid": "^8.3.0",
"@types/ws": "^7.4.0",
"@zerollup/ts-transform-paths": "^1.7.18",
"ts-patch": "^1.4.4",
"typescript": "^4.3.5"
},
"dependencies": {
-14
View File
@@ -1,14 +0,0 @@
const tsConfigPaths = require("tsconfig-paths");
const path = require("path");
const cleanup = tsConfigPaths.register({
baseUrl: path.join(__dirname, "node_modules", "@fosscord"),
paths: {
"@fosscord/api": ["api/dist/index.js"],
"@fosscord/api/*": ["api/dist/*"],
"@fosscord/gateway": ["gateway/dist/index.js"],
"@fosscord/gateway/*": ["gateway/dist/*"],
"@fosscord/cdn": ["cdn/dist/index.js"],
"@fosscord/cdn/*": ["cdn/dist/*"],
},
});