From 9e9076ce05ef80a2cf0078fc679bd5a4b66da82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 16 May 2023 13:38:21 +0200 Subject: [PATCH] chore: use concurrently to run parallel builds (#3785) ## About the changes Small improvement to speed up the build, tested locally validating the output with and without concurrently. **Note** this also removes copy-templates from the backend build --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index df2f6ba9a5b..385d72f3b64 100644 --- a/package.json +++ b/package.json @@ -31,16 +31,16 @@ "main": "./dist/lib/server-impl.js", "scripts": { "start": "TZ=UTC node ./dist/server.js", - "build:backend": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/ && tsc --pretty --strictNullChecks false", + "copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/", + "build:backend": "tsc --pretty --strictNullChecks false", "build:frontend": "yarn --cwd ./frontend run build", - "build": "yarn run build:frontend && yarn run build:backend", + "build": "concurrently \"yarn:copy-templates\" \"yarn:build:frontend\" \"yarn:build:backend\"", "dev:backend": "TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"", "dev:frontend": "wait-on tcp:4242 && yarn --cwd ./frontend run dev", "dev": "concurrently \"yarn:dev:backend\" \"yarn:dev:frontend\"", "prepare": "node scripts/husky-install && yarn --cwd ./frontend install && if [ ! -d ./dist ]; then yarn build; fi", "prestart:dev": "yarn run clean", "start:dev": "TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"", - "copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/", "db-migrate": "db-migrate --migrations-dir ./src/migrations", "lint": "eslint ./src", "local:package": "del-cli --force build && mkdir build && cp -r dist docs CHANGELOG.md LICENSE README.md package.json build",