I can able to rename file name from index. using following configuration
Gulp.js
var rename = require("gulp-rename");
gulp.task('modify-html', function () {
gulp.src('reports/index.html')
.pipe(rename('/app.html'))
.pipe(gulp.dest('reports/'));
});
Does anyone know how to delete the body content of my html file using gulp
index.html
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
You can use gulp-html-replace it replaces the HTML block.
Mark the content which needs to be removed
and use it like
Then, You can use gulp-dom
Note: I have not tested it.