fix(docs): use rimraf for cross-platform clean script - #79
Open
dsorajisto wants to merge 1 commit into
Open
Conversation
The docs package's clean script used `rm -rf` which doesn't exist on Windows Command Prompt, so `pnpm --filter @agentscript/docs clean` failed for Windows contributors. Swaps `rm -rf` for `rimraf` (the JS ecosystem standard for cross-platform recursive delete) and adds it as a devDependency. The invocation surface is identical (rimraf accepts the same positional path arguments as rm -rf). Verified locally on macOS: `pnpm --filter @agentscript/docs clean` deletes both `build/` and `.docusaurus/` as expected. Loosely related to salesforce#67 (Windows docs build failures). Does not claim to fully fix salesforce#67 since the reporter's original error was about `docusaurus` not being recognized, not about the clean script — but this is one concrete Windows-hostile bit in the same package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Swaps the
cleanscript inapps/docs/package.jsonfromrm -rftorimraffor cross-platform compatibility. Addsrimrafas a devDependency.Why
The current script:
fails on Windows Command Prompt because
rmdoesn't exist there. Windows contributors runningpnpm --filter @agentscript/docs cleanget'rm' is not recognized as an internal or external command.rimrafis the JS ecosystem standard for cross-platform recursive delete and accepts the same positional path arguments, so the invocation surface is unchanged for macOS/Linux users.How
apps/docs/package.json:"clean": "rm -rf build .docusaurus"→"clean": "rimraf build .docusaurus""rimraf": "^6.1.3"todevDependencies(alphabetically ordered)pnpm-lock.yaml: regenerated bypnpm install— 38 line additions covering rimraf and its transitive deps (glob, minimatch, etc.). No other packages affected.Test Plan
Verified locally on macOS (arm64):
Both target directories were deleted as expected. The behavior on Windows should be equivalent since
rimrafis designed for that.pnpm --filter @agentscript/docs cleanworks on macOS (removes both dirs)pnpm installregenerates lockfile cleanlyRelated
Loosely related to #67 (Windows docs build failures). Does not claim to fully fix #67 — the reporter's original error was about
docusaurusnot being recognized, which is a different failure mode — but this removes one concrete Windows-hostile bit from the docs package.Checklist