index.js
// Plugin level function(dealing with files)
Plugin level function(dealing with files)
Plugin level function ( dealing with files )
function gulpRemoveRequire(opts) {
    opts = opts || {};
    return through.obj(function(file, enc, cb) {
        if (file.isNull()) {
            return cb(null, file);
        }
        if (file.isStream()) {
            cb(new gutil.PluginError('gulp-remove-require', 'Streaming not supported'));
            return;
        }
        if (file.isBuffer()) {
            file.contents = new Buffer(processRequires(file.contents.toString(), opts));
        }
        cb(null, file);
    });
}
function gulpRemoveRequire ( opts ) { opts = opts || { } ; return through . obj ( function ( file , enc , cb ) { if ( file . isNull ( ) ) { return cb ( null , file ) ; } if ( file . isStream ( ) ) { cb ( new gutil . PluginError ( 'gulp-remove-require' , 'Streaming not supported' ) ) ; return ; } if ( file . isBuffer ( ) ) { file . contents = new Buffer ( processRequires ( file . contents . toString ( ) , opts ) ) ; } cb ( null , file ) ; } ) ; }
Plugin level function(dealing with files)
Plugin level function ( dealing with files )
// Creating a stream through which each file will pass // if null, buffer or stream //gutil.log('file isBuffer');