From a1cc60638a5a935eacdabdc11bcfc0bef98505fe Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 17 Jul 2023 17:23:37 +0200 Subject: [PATCH] Added `yarn build:clean` command - this reset the Nx build cache and removes the build files from each package: --- package.json | 2 ++ yarn.lock | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 638a1d2a06..25aa504e7d 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "scripts": { "archive": "nx run ghost:archive", "build": "nx run-many -t build", + "build:clean": "nx reset && rimraf -g 'ghost/*/build'", "dev:debug": "DEBUG_COLORS=true DEBUG=@tryghost*,ghost:* yarn dev", "dev:admin": "node .github/scripts/dev.js --admin", "dev:ghost": "node .github/scripts/dev.js --ghost", @@ -129,6 +130,7 @@ "husky": "8.0.3", "lint-staged": "13.2.3", "nx": "16.5.2", + "rimraf": "5.0.1", "ts-node": "10.9.1" } } diff --git a/yarn.lock b/yarn.lock index b9aad6951d..3a332e518a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18029,7 +18029,7 @@ glob@8.1.0, glob@^8.0.3, glob@^8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^10.0.0: +glob@^10.0.0, glob@^10.2.5: version "10.3.3" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b" integrity sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw== @@ -27949,6 +27949,13 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha512-zgn5OjNQXLUTdq8m17KdaicF6w89TZs8ZU8y0AYENIU6wG8GG6LLm0yLSiPY8DmaYmHdgRW8rnApjoT0fQRfMg== +rimraf@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.1.tgz#0881323ab94ad45fec7c0221f27ea1a142f3f0d0" + integrity sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg== + dependencies: + glob "^10.2.5" + rimraf@^2.2.8, rimraf@^2.3.4, rimraf@^2.4.3, rimraf@^2.5.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"