# gulp-clean-dir

> Gulp plugin to clean directory

Latest version **1.0.2** (published 2019-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-clean-dir
pnpm add gulp-clean-dir
yarn add gulp-clean-dir
bun add gulp-clean-dir
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-02-06 |
| First published | 2019-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Wilmer H. Muñoz |
| Maintainers | wilmerhmg |
| Keywords | gulp, gulpplugin, clean, remove, output, outputdir, dest |

## Links

- npm: https://www.npmjs.com/package/gulp-clean-dir
- Repository: https://github.com/Dev-Wito/gulp-clean-dir
- Homepage: https://github.com/Dev-Wito/gulp-clean-dir#readme
- Issues: https://github.com/Dev-Wito/gulp-clean-dir/issues
- npm.io page: https://npm.io/package/gulp-clean-dir

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^3.0.0

## Recent versions

- 1.0.2 (latest) — 2019-02-06
- 1.0.1 — 2019-02-06
- 1.0.0 — 2019-02-06

## README

# Usage of gulp-clean-dir
[![NPM version](https://img.shields.io/npm/v/gulp-clean-dir.svg)](https://npmjs.org/package/gulp-clean-dir)
[![Downloads](https://img.shields.io/npm/dm/gulp-clean-dir.svg)](https://npmjs.org/package/gulp-clean-dir)
[![Build Status](https://travis-ci.org/Dev-Wito/gulp-clean-dir.svg?branch=master)](https://travis-ci.org/Dev-Wito/gulp-clean-dir)
[![Coverage Status](https://coveralls.io/repos/github/Dev-Wito/gulp-clean-dir/badge.svg?branch=master)](https://coveralls.io/github/Dev-Wito/gulp-clean-dir?branch=master)

It's plugin for gulp clean a directory.

## Installation

````
npm i gulp-clean-dir
````
or
```
npm i -D gulp-clean-dir
```

## Example of the clearDir() function

Here is an example of how to use the clearDir() function in your gulpfile.js file:
```js
const gulp     = require('gulp');
const cleanDir = require('gulp-clean-dir');

gulp.task('assemble', function() {
return gulp.src('./assembly.json')
	.pipe(cleanDir('./dist'))
	.pipe(gulp.dest('./dist'))
});
```

### Only some extensions
Clean directory files that match extensions
```js
const gulp     = require('gulp');
const cleanDir = require('gulp-clean-dir');

gulp.task('assemble', function() {
return gulp.src('./assembly.json')
	.pipe(cleanDir('./dist',{
        ext:['.js']
    }))
    .pipe(gulp.dest('./dist'))
});
```

---
_Source: https://npm.io/package/gulp-clean-dir · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
