Skip to content

Instantly share code, notes, and snippets.

@horizon0514
Last active December 7, 2021 11:52
Show Gist options
  • Save horizon0514/e73a87acf5314c702bb2a314a1bfab2f to your computer and use it in GitHub Desktop.
Save horizon0514/e73a87acf5314c702bb2a314a1bfab2f to your computer and use it in GitHub Desktop.
Delete glob files use Node
import del from del;
async function deleteFiles(patterns) {
return del(patterns);
}
// use example
// const pattern = [`packages/**/*.js`, `!packages/common/**/*.js`, '!packages/example/**/*.js'];
// deleteFiles(pattern);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment