1.0.3 • Published 4 months ago

gulp-remove-empty-lines-html v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

gulp-remove-empty-lines-html

A Gulp plugin that removes empty lines and lines containing only whitespace from HTML files.

Installation

npm install gulp-remove-empty-lines-html --save-dev

Usage

const { src, dest } = require('gulp');
const removeEmptyLines = require('gulp-remove-empty-lines-html');

gulp.task('clean-html', () => {
  return gulp.src('./src/**/*.html')
    .pipe(removeEmptyLines())
    .pipe(gulp.dest('./dist'));
});

Options

removeComments
Default: false
Type: boolean
Description: Remove all the comments from html files.

removeSpaces
Default: false
Type: boolean
Description: Remove all duplicate spaces from any file.

Example

Input:

<html>

  <head>
    
  </head>

  <body>
    
    <h1>Hello</h1>

  </body>

</html>

Output:

<html>
  <head>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

License

MIT

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago