Skip to content
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

Add a standalone script suitable for cleaning node_modules #138

Closed
wants to merge 1 commit into from

Conversation

kylecordes
Copy link

This is a workaround/solution for annoying problems:

  • Unlike almost every other package, I would really really like to be able to use rimraf from package scripts prior to a successful installation/population of node_modules

  • I would like to be able to use rimraf to delete node_modules itself, in its entirety, on Windows, without relying on a global rimraf installation

I think it fixes #102.

It may make more sense for me to just publish this somewhere else, @isaacs please feel free to unceremoniously close my PR if you disagree with the whole approach taken here!

This is a workaround/solution for annoying problems:

* Unlike almost every other package, I would really really like to be able to use rimraf from package scripts prior to a successful installation/population of node_modules

* I would like to be able to use rimraf to delete node_modules itself, in its entirety, on Windows, without relying on a global rimraf installation
directory. Unfortunately, this has two major downsides:

* Must `npm install` to have rimraf available for cleaning.
* On some platforms (possibland possibly other platforms) this fails,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like copy-editing error?

@isaacs
Copy link
Owner

isaacs commented Mar 2, 2017

Yeah, this feels like it should be a separate module. I'm happy to provide a link in the readme, once you publish it.

It's a bit outside of the contract of rimraf, and only useful for a very specific use case (deleting the folder where rimraf is installed) and only relevant to Windows.

Just out of curiosity, how often do you find it necessary to fully delete node_modules? That seems like a weird thing to have to do often enough that this is a significant need. Maybe I'm misunderstanding a common use case?

@isaacs isaacs closed this Mar 2, 2017
@kylecordes
Copy link
Author

Thank you, I will come up with a variation that makes sense to publish only on its own - without the base rimraf functionality even.

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.

rimraf in package.json error
2 participants