Nasty Popsicle Machine

    gulp-clean-dir

    1.0.2 • Public • Published

    Usage of gulp-clean-dir

    NPM version Downloads Build Status Coverage Status

    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:

    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

    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'))
    });

    Install

    npm i gulp-clean-dir

    DownloadsWeekly Downloads

    775

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.42 kB

    Total Files

    10

    Last publish

    Collaborators

    • wilmerhmg