Hello, I have a use case where I want to empty a folder, but keep some of the files/folders in that folder if they exist.
If you're curious about my use case - I have a function that initializes a new node project in a specified directory and then runs npm install. If that directory already has a node_modules folder, I would like to keep the folder so that the node modules wouldn't need to be unnecessarily re-installed when running npm install
Thanks!
P.S I can make a PR for this too, but I would first like to know if this is something that the owners of the package would approve of.
Hello, I have a use case where I want to empty a folder, but keep some of the files/folders in that folder if they exist.
If you're curious about my use case - I have a function that initializes a new node project in a specified directory and then runs
npm install
. If that directory already has a node_modules folder, I would like to keep the folder so that the node modules wouldn't need to be unnecessarily re-installed when runningnpm install
Thanks!
P.S I can make a PR for this too, but I would first like to know if this is something that the owners of the package would approve of.