I want to delete the build folder for my repo. All contents inside it. But I need to keep the build folder. Essentially clean everything inside the folder but remove it.
Currently I am using "rimraf build" in package.json scripts. But it removes the build folder as well.
How do i use rimraf ( or any other utility ) to remove the contents of a folder but not the folder itself?
rimraf <dirname>/*
should delete all files but not the parent folder.
So, rimraf build/*
should work for your case/