JSPM

clean-directory

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 258
  • Score
    100M100P100Q87968F
  • License MIT

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

Package Exports

  • clean-directory

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clean-directory) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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