From 1947fa238c992e797a6ec51a7853023badfd6f55 Mon Sep 17 00:00:00 2001 From: JakeSCahill Date: Tue, 7 Apr 2026 10:06:13 +0100 Subject: [PATCH] chore: Add clean and build:clean scripts Add npm scripts to clean build artifacts before building. This prevents the glob-stream stack overflow error that occurs when the docs/ directory accumulates too many files from previous builds. - npm run clean: removes docs/ and .cache/ directories - npm run build:clean: cleans then builds in one command --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 0b1d73833..011f7a579 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "Redpanda documentation", "license": "ISC", "scripts": { + "clean": "rm -rf docs .cache", "build": "antora --to-dir docs --fetch local-antora-playbook.yml", + "build:clean": "npm run clean && npm run build", "serve": "wds --node-resolve --open / --watch --root-dir docs --port 5002", "start": "cross-env-shell LIVERELOAD=true npx gulp" },