From e54be5da0207ec9b7fdd416d6acc5122e7528823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Wed, 27 Feb 2019 14:36:13 +0100 Subject: [PATCH] Simplify compiling and running --- .gitignore | 1 + Dockerfile | 1 + package.json | 3 ++- tsconfig.json | 8 ++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 95b863a..45930ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config.json node_modules +build \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index aee081a..bd5f651 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /server COPY . /server RUN npm install +RUN mkdir build && npm build CMD [ "npm", "start" ] diff --git a/package.json b/package.json index 45d8334..db087bc 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Language bot for matrix", "main": "index.js", "scripts": { - "start": "nodemon --exitcrash --ignore *.sqlite -x ts-node index.ts" + "build": "tsc", + "start": "node build/index.js" }, "author": "Daniel", "license": "ISC", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2463c80 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "outDir": "build" + }, + "files": [ + "index.ts" + ] +} \ No newline at end of file