项目作者: nib-health-funds

项目描述 :
Delete the original file rewritten by gulp-rev.
高级语言: JavaScript
项目地址: git://github.com/nib-health-funds/gulp-rev-delete-original.git
创建时间: 2015-05-25T01:08:21Z
项目社区:https://github.com/nib-health-funds/gulp-rev-delete-original

开源协议:MIT License

下载


gulp-rev-delete-original

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

Installation

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

Usage

  1. var gulp = require('gulp');
  2. var rev = require('gulp-rev');
  3. var revcss = require('gulp-rev-css-url');
  4. var revdel = require('gulp-rev-delete-original');
  5. gulp.task('rev', function () {
  6. return gulp.src('./app/**/*')
  7. .pipe(rev())
  8. .pipe(revcss())
  9. .pipe(revdel())
  10. .pipe(gulp.dest('./build/'))
  11. ;
  12. });

Options

exclude

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

Example

RegExp:

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

Function:

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