Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

gulp-rev-delete-original

0.2.3 • Public • Published

gulp-rev-delete-original

Delete the original file rewritten by gulp-rev or gulp-rev-all.

Installation

npm install --save-dev gulp-rev-delete-original

Usage

var gulp = require('gulp');
var rev = require('gulp-rev');
var revcss = require('gulp-rev-css-url');
var revdel = require('gulp-rev-delete-original');
 
gulp.task('rev', function () {
  return gulp.src('./app/**/*')
    .pipe(rev())
    .pipe(revcss())
    .pipe(revdel())
    .pipe(gulp.dest('./build/'))
  ;
});

Options

exclude

A filter RegExp or function that allows you to exclude certain files from being deleted.

Example

RegExp:

revdel({
  exclude: /build\.css$/
});

Function:

revdel({
  exclude: function(file) {
    if (/build\.css$/.test(file.name)) {
      return true; //if you want to exclude the file from being deleted
    }
  }
});

install

npm i gulp-rev-delete-original

Downloadsweekly downloads

6,367

version

0.2.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability