Skip to content

Cross-platform remove dist folder using rimraf in build script #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

girish-io
Copy link
Contributor

I was trying to build the package on a Windows system using npm run build. This however gave me the following error:

'rm' is not recognized as an internal or external command,
operable program or batch file.

This happened because the build script currently uses the unix command rm to remove the dist folder which doesn't exist on Windows.

I have replaced it with rimraf which allows us to remove the directory regardless of the platform we're developing on. This however introduces a new library and I'm not sure whether this is acceptable or not, so please let me know 😃

@davidcalhoun
Copy link
Owner

Great, thank you for this! Looks good.

@davidcalhoun davidcalhoun merged commit d0dc504 into davidcalhoun:master Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants