From de6ab6277b17c68d98ab79ab7aeefb3d9fc8f3f6 Mon Sep 17 00:00:00 2001 From: E Date: Sat, 11 Sep 2021 22:07:23 +0100 Subject: [PATCH] Fix incorrect command and split into several runs (#19) * Change node version in Dockerfile and steps * Change name of scripts in package.json --- Dockerfile | 6 ++++-- package.json | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a94b47c..0af8850 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ -FROM node:10.19.0 +FROM node:16.8.0 ENV IS_DOCKER=true ENV NODE_ENV=production WORKDIR /app COPY ["package.json", "package-lock.json*", "./"] -RUN npm install && npm build-tails && npm install nodemon +RUN npm install +RUN npm install nodemon COPY . . +RUN npm run build-tailwind CMD [ "npm", "start" ] diff --git a/package.json b/package.json index e81a2a4..654e5e0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "watch": { - "build-tail": { + "build-tailwind": { "patterns": [ "views/" ], @@ -13,8 +13,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "npx nodemon ./bin/www -e js,pug,sass", - "watch-tail": "npm-watch", - "build-tail": "postcss src/tailwind.css -o public/stylesheets/style.css" + "watch-tailwind": "npx npm-watch", + "build-tailwind": "npx postcss src/tailwind.css -o public/stylesheets/style.css" }, "dependencies": { "@sendgrid/mail": "^7.4.4",