#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
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