From 92b81ab8e77e7e96898c5d27f8b4e11ce4677cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Thu, 27 Feb 2025 11:55:51 +0000 Subject: [PATCH] Merged in fix/ci-build (pull request #1434) Fix/ci build * fix: use explicit ci:build command since pre-scripts don't work in yarn * fix: don't remove .next-folder on dev * revert change to netlify.toml Approved-by: Anton Gunnarsson --- apps/scandic-web/package.json | 14 ++++++-------- package.json | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/scandic-web/package.json b/apps/scandic-web/package.json index 752553333..9f63a1aba 100644 --- a/apps/scandic-web/package.json +++ b/apps/scandic-web/package.json @@ -4,14 +4,10 @@ "private": true, "type": "module", "scripts": { - "prebuild": "yarn lint && yarn test:unit", - "build": "next build", - "predev": "rm -rf .next", + "build": "yarn clean && next build", "dev": "PORT=3000 NEXT_PUBLIC_PORT=3000 next dev", - "prelint": "rm -rf .next", - "lint": "next lint --max-warnings 0 && tsc", - "prelint:fix": "rm -rf .next", - "lint:fix": "next lint --fix --max-warnings 0 && tsc", + "lint": "yarn clean && next lint --max-warnings 0 && tsc", + "lint:fix": "yarn clean && next lint --fix --max-warnings 0 && tsc", "start": "node .next/standalone/server.js", "test:component": "cypress open --component", "test:component:headless": "cypress run --component", @@ -20,7 +16,9 @@ "test:setup": "yarn build && yarn start", "preinstall": "/bin/sh -c \"export $(cat .env.local | grep -v '^#' | xargs)\"", "test:unit": "jest", - "test:unit:watch": "jest --watch" + "test:unit:watch": "jest --watch", + "ci:build": "yarn lint && yarn test:unit && yarn build", + "clean": "rm -rf .next" }, "dependencies": { "@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.27", diff --git a/package.json b/package.json index 55578d911..f7aea72c7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "scandic", "packageManager": "yarn@4.6.0", "scripts": { - "build": "yarn workspace @scandic-hotels/design-system build && yarn workspace @scandic-hotels/scandic-web build", + "build": "yarn workspace @scandic-hotels/design-system build && yarn workspace @scandic-hotels/scandic-web ci:build", "lint": "yarn workspace @scandic-hotels/scandic-web lint", "postinstall": "husky" },