From cb5e84023a9ff667ffad5405fd91e96d82ea118f Mon Sep 17 00:00:00 2001 From: JakeSCahill Date: Tue, 7 Apr 2026 09:41:36 +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 bd604c96e8..846b057656 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", "test-quickstart": "cd tests/setup-tests && npx doc-detective --input ../../modules/get-started/pages/quick-start.adoc -l debug",