gulp-clean-old

0.2.5 • Public • Published

gulp-clean-old

Removes files and folders.

Information

Packagegulp-clean-old
Description This is a fork of the original gulp-clean, compatible with older versions of node
Node Version >= 0.8

Install

Install with npm.

npm install --save-dev gulp-clean-old

Example

var gulp = require('gulp');
var clean = require('gulp-clean-old');
 
gulp.task('default', function() {
    gulp.src('app/tmp', {read: false})
        .pipe(clean());
});

Option read false prevents gulp to read the contents of the file and makes this task a lot faster.

After using gulp-clean-old the stream still contains the app/tmp and it can be used i.e. for moving the content to different location.

var gulp = require('gulp');
var clean = require('gulp-clean-old');
 
gulp.task('default', function() {
    gulp.src('app/tmp/index.js', {read: false})
        .pipe(clean({force: true}));
        .pipe(gulp.dest('dist'));
});

For safety files and folders outside the current working directory can be removed only with option force set to true.

License

MIT @ Peter Vilja

Readme

Keywords

Package Sidebar

Install

npm i gulp-clean-old

Weekly Downloads

3

Version

0.2.5

License

none

Last publish

Collaborators

  • ground5hark