#Installation
Install package with NPM and add it to your development dependencies:
npm install gulp-rb-validate-html --save-dev
#Usage
Basic
var rbhtml = require('gulp-rb-validate-html');
gulp.task('rb-validate', function () {
gulp.src('./src/**/*.html')
.pipe(rbhtml());
});
Multiple Filepath Patterns
var rbhtml = require('gulp-rb-validate-html');
gulp.task('rb-validate', function () {
gulp.src(['./src/*.html', './src/app/**/*.html'],
{ base: './src/' })
.pipe(rbhtml());
});
With Parameter
var rbhtml = require('gulp-rb-validate-html');
gulp.task('rb-validate', function () {
gulp.src('./src/**/*.html')
.pipe(rbhtml({
exitOnError: true,
indent: '\t',
checkRemote: false,
checkViewport: false
});
});
#Parameters
exitOnError: Boolean (Default: false)
This will cause the plugin to abort with exit code 1 as soon as an error with obligation level red is found
indent: String (Default: 4 spaces)
Defines the standard indentation pattern for the project
checkIndentInTags: Boolean (Default: false)
Set to true to activate indentation checks inside HTML tags (between < and >)
checkIndent: Boolean (Default: true)
Set to false to deactivate indentation checks altogether
checkRemote: Boolean (Default: true)
Set to false to deactivate all warnings caused by remote resource URLs in HTML code
checkViewport: Boolean (Default: true)
Set to false if the application is not responsive/for mobile devices