fix(core): use rimraf instead of rm -rf in build script for Windows support#3297
Draft
nynexman4464 wants to merge 1 commit into
Draft
fix(core): use rimraf instead of rm -rf in build script for Windows support#3297nynexman4464 wants to merge 1 commit into
rm -rf in build script for Windows support#3297nynexman4464 wants to merge 1 commit into
Conversation
…upport
The `build` script in @astryxdesign/core started with `rm -rf dist`, which
fails on Windows cmd/PowerShell with:
'rm' is not recognized as an internal or external command
Switch to `rimraf` (added as a devDependency) so the build is portable
across macOS, Linux, and Windows. This is the only `rm -rf` in any
package script in the repo.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Replace
rm -rf distwithrimraf distinpackages/core'sbuildscript, and addrimrafas a devDependency.Why
The
buildscript in@astryxdesign/corecurrently starts withrm -rf dist, which fails on Windows cmd/PowerShell:This is the only
rm -rfin any package script across the entire repo, so it's a one-line fix:How
packages/core/package.json:rm -rf dist→rimraf dist"rimraf": "^6.0.1"todevDependenciesTesting
pnpm -F @astryxdesign/core buildon macOS still produces the samedist/output (verified locally).rimrafJS binary instead of relying on a POSIXrm.Notes
rimrafis the npm-ecosystem standard for cross-platform recursive delete (~50KB, no runtime deps relevant to the build). Alternatives considered:node -e "require('fs').rmSync(...)"— works but ugly, and quote-escaping varies across cmd.exe/PowerShell/sh.scripts/build-css.mjsetc.) — bigger surface area for a small problem.