close
The Wayback Machine - https://web.archive.org/web/20201022125712/https://github.com/Leelow/clean-directory
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

clean-directory

NPM downloads Build Status Build Status Codacy Coverage Codacy Grade Dependencies Dev-dependencies JavaScript Style Guide

A tiny module to clean a directory selecting which files or directories to keep.

Install

$ npm install --save clean-directory

Usage

const invert = require('clean-directory');

// empty the directory
clean('/path/to/dir'); 

// empty the directory keeping a and its contents
clean('/dir', 'a/**');

// multiple patterns are possible
clean('/dir', ['a/**', 'b/**']);

Test and coverage

You just have to clone the repo and run

$ npm test
$ npm run coverage

License

MIT Β© LΓ©o Lozach

About

πŸ› ✨ A tiny module to clean a directory selecting which files or directories to keep.

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.