Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const path = "node_modules/";
- // Remove files by list of globs (eg. "*.md")
- for (let file of files) {
- await exec(`find ${path} -type f -iname ${file} -print0 | xargs -0 rm -f`);
- }
- // Remove dirs by list of names
- for (let dir of dirs) {
- await exec(`find ${path} -type d -name ${dir} -print0 | xargs -0 rm -rf`);
- }
Add Comment
Please, Sign In to add comment