refactor: typescript migration #24

Merged
Anri merged 10 commits from ts-migration into main 2022-07-20 23:01:49 +02:00
4 changed files with 11 additions and 4 deletions
Showing only changes of commit de32cd4891 - Show all commits

View file

@ -4,3 +4,4 @@
!package.json
!package-lock.json
!LICENCE
!tsconfig.json

View file

@ -10,4 +10,8 @@ WORKDIR /app
COPY --chown=node:node . .
RUN npm ci --only=production
CMD ["dumb-init", "node", "src/index.js"]
RUN npx tsc
RUN rm -r src/ tsconfig.json
CMD ["dumb-init", "node", "./dist/index.js"]

View file

@ -17,14 +17,14 @@
"dependencies": {
"@discordjs/rest": "^0.5.0",
"discord-api-types": "^0.36.0",
"discord.js": "^13.8.1"
"discord.js": "^13.8.1",
"typescript": "^4.7.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"dotenv": "^16.0.1",
"eslint": "^8.20.0",
"ts-node-dev": "^2.0.0",
"typescript": "^4.7.4"
"ts-node-dev": "^2.0.0"
}
}

View file

@ -7,6 +7,8 @@ const run = async () => {
// Load .env if not in prod
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
(await import('dotenv')).config({ path: './config/.env' });
}