gulp-identity

A gulp plugin that does nothing. Passes the stream/files unchanged.


Keywords
gulp, gulp-plugin, plugin, nothing, identity
License
MIT
Install
npm install gulp-identity@0.1.0

Documentation

gulp-identity

Does nothing to stream/file. Passes them unchanged.

Install

$ npm install --save-dev gulp-identity

Possible usage

Say you need to minify your js files only on production env and want your tasks to be more readable.

var gulp = require('gulp');

var minifyJs;
if ('production' == process.env.NODE_ENV) {
  minifyJs = require('gulp-uglify');
} else {
  minifyJs = require('gulp-identity');
}

gulp.task('default', function () {
  return gulp.src('src/*.js')
    .pipe(minifyJs())
    .pipe(gulp.dest('dist'));
});

License

MIT