From a51b94913ab193c53ad9d2432b36b85a45c75bda Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 12 May 2021 07:33:35 +0200 Subject: [PATCH] Use swc for TypeScript and don't print by default --- languages/javascript/run.sh | 3 ++- languages/typescript/Dockerfile | 2 +- languages/typescript/run.sh | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/languages/javascript/run.sh b/languages/javascript/run.sh index 6e087ee..6629b86 100644 --- a/languages/javascript/run.sh +++ b/languages/javascript/run.sh @@ -1 +1,2 @@ -cat | node -p +cat > program.js +node program.js diff --git a/languages/typescript/Dockerfile b/languages/typescript/Dockerfile index f1eb610..4007da5 100644 --- a/languages/typescript/Dockerfile +++ b/languages/typescript/Dockerfile @@ -1,6 +1,6 @@ FROM node:alpine LABEL author="1Computer1" -RUN yarn global add typescript @types/node +RUN npm install --global --save-dev @swc/core @swc/register COPY run.sh /var/run/ diff --git a/languages/typescript/run.sh b/languages/typescript/run.sh index 4d12a04..77ff51d 100644 --- a/languages/typescript/run.sh +++ b/languages/typescript/run.sh @@ -1,4 +1,2 @@ cat > program.ts -tsc --lib DOM,ESNext --target ES2019 --strict \ - --skipLibCheck --types /usr/local/share/.config/yarn/global/node_modules/@types/node program.ts \ - && cat program.js | node -p +swc-node program.ts