Guest User

Untitled

a guest
Jun 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const path = "node_modules/";
  2.  
  3. // Remove files by list of globs (eg. "*.md")
  4. for (let file of files) {
  5. await exec(`find ${path} -type f -iname ${file} -print0 | xargs -0 rm -f`);
  6. }
  7.  
  8. // Remove dirs by list of names
  9. for (let dir of dirs) {
  10. await exec(`find ${path} -type d -name ${dir} -print0 | xargs -0 rm -rf`);
  11. }
Add Comment
Please, Sign In to add comment