gulp/tasks/undermore.js
function cleanContent() {
    function transform(file, cb) {
        file.contents = new Buffer((function (src) {
            var lines = src.replace('_.mixin({\n','').split('\n'),
                last = lines.pop();
            // handle empty lines at the end of the file
            while(last===''){
                last = lines.pop();
            }
            return lines.join('\n');
        })(String(file.contents)));
        cb(null, file);
    }

    return require('event-stream').map(transform);
}
function cleanContent() {
    function transform(file, cb) {
        file.contents = new Buffer((function (src) {
            var lines = src.replace('_.mixin({\n','').split('\n'),
                last = lines.pop();
            // handle empty lines at the end of the file
            while(last===''){
                last = lines.pop();
            }
            return lines.join('\n');
        })(String(file.contents)));
        cb(null, file);
    }

    return require('event-stream').map(transform);
}
function cleanContent ( ) { function transform ( file , cb ) { file . contents = new Buffer ( ( function ( src ) { var lines = src . replace ( '_.mixin({\n' , '' ) . split ( '\n' ) , last = lines . pop ( ) ; // handle empty lines at the end of the file while ( last === '' ) { last = lines . pop ( ) ; } return lines . join ( '\n' ) ; } ) ( String ( file . contents ) ) ) ; cb ( null , file ) ; } return require ( 'event-stream' ) . map ( transform ) ; }
This method is used as a modifier for minification to clean up
the stream a bit.
This method is used as a modifier for minification to clean up the stream a bit .