Use swc for TypeScript and don't print by default

This commit is contained in:
Manuel 2021-05-12 07:33:35 +02:00
parent 73d3fce78a
commit a51b94913a
Signed by: Manuel
GPG key ID: 4085037435E1F07A
3 changed files with 4 additions and 5 deletions

View file

@ -1 +1,2 @@
cat | node -p cat > program.js
node program.js

View file

@ -1,6 +1,6 @@
FROM node:alpine FROM node:alpine
LABEL author="1Computer1" 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/ COPY run.sh /var/run/

View file

@ -1,4 +1,2 @@
cat > program.ts cat > program.ts
tsc --lib DOM,ESNext --target ES2019 --strict \ swc-node program.ts
--skipLibCheck --types /usr/local/share/.config/yarn/global/node_modules/@types/node program.ts \
&& cat program.js | node -p