gulp.task('validate', function () {

	gulp.src('**/*.html')
	.pipe(w3cjs())
	.pipe(w3cjs.reporter());

});
Beispiel #2
0
gulp.task('htmllint', function() {
  return gulp.src(dirs.src + '*.html')
  // html linter
  .pipe(w3cjs())
  .pipe(w3cjs.reporter())
  // Output files in src folder
  .pipe(gulp.dest(dirs.src))
});
Beispiel #3
0
gulp.task('html', ['styles', 'scripts'], () => {
  return gulp.src('app/*.html')
    .pipe($.useref({
      searchPath: ['.tmp', 'app', '.']
    }))
    //.pipe($.if('*.js', $.uglify({mangle: false}))) // if uglify messes up
    .pipe($.if('*.js', $.uglify()))
    .pipe($.if('*.css', $.cssnano()))
    .pipe($.if('*.html', w3cjs()))
    .pipe($.if('*.html', w3cjs.reporter()))
    .pipe($.if('*.html', $.htmlmin({
      collapseWhitespace: false
    })))
    .pipe(gulp.dest('dist'));
});