mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 17:30:07 +00:00
build(rest-passthrough): Use typescript to build (#4432)
* build(rest-passthrough): Use typescript to build It doesn't make a lot of sense for something like this to use SWC to build + this needed typescript with a tsconfig anyway for a typecheck * Add tsconfig * Remove .swcrc and copy tsconfig in docker --------- Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"decorators": true,
|
||||
"dynamicImport": true
|
||||
},
|
||||
"transform": {
|
||||
"legacyDecorator": true,
|
||||
"decoratorMetadata": true
|
||||
},
|
||||
"target": "es2022",
|
||||
"keepClassNames": true,
|
||||
"loose": true
|
||||
},
|
||||
"module": {
|
||||
"type": "es6",
|
||||
"strict": false,
|
||||
"strictMode": true,
|
||||
"lazy": false,
|
||||
"noInterop": false
|
||||
},
|
||||
"sourceMaps": "inline"
|
||||
}
|
||||
@@ -15,7 +15,7 @@ WORKDIR /app
|
||||
# copy the source files
|
||||
COPY src/ src/
|
||||
# copy the compiler config
|
||||
COPY .swcrc ./
|
||||
COPY tsconfig.json ./
|
||||
# compile the files
|
||||
RUN yarn build
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"version": "1.0.0",
|
||||
"packageManager": "yarn@4.6.0",
|
||||
"scripts": {
|
||||
"build": "swc src --strip-leading-paths --delete-dir-on-start --out-dir dist",
|
||||
"build": "tsc",
|
||||
"start:dev": "yarn exec node -r dotenv/config dist/server.js",
|
||||
"start:prod": "yarn exec node ./dist/server.js",
|
||||
"release": "cliff-jumper"
|
||||
@@ -19,8 +19,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^6.0.0",
|
||||
"@swc/cli": "^0.7.8",
|
||||
"@swc/core": "^1.13.5",
|
||||
"dotenv": "^17.2.1"
|
||||
"@types/node": "^24.3.1",
|
||||
"dotenv": "^17.2.1",
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
19
docker-apps/rest-passthrough/tsconfig.json
Normal file
19
docker-apps/rest-passthrough/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
// Visit https://aka.ms/tsconfig to read more about this file
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"module": "node20",
|
||||
"target": "es2020",
|
||||
"lib": ["ES2020"],
|
||||
"types": ["node"],
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"strict": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"isolatedModules": true,
|
||||
"noUncheckedSideEffectImports": true,
|
||||
"moduleDetection": "force",
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user