node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

gulp-remove-line

gulp-remove-line

Remove lines from file by line number

Notes

With thanks to Carsten Schäfer's gulp-delete-lines

Example: Remove lines 2, 10, 11, 12 and 25

var gulp = require( "gulp" );
var removeLine = require( "gulp-remove-line" );
 
gulp.task( "remove-lines", function ( ) {
 
    gulp.src( [ "../build/index.html", "background/background.html" ] )
        .pipe( removeLine( { "index.html": [ 2, "10-12", 25 ], "background.html": [ "3-7" ] } ) )
        .pipe( gulp.dest( "dist" ) );
 
});