gulp-rb-validate-html

Gulp plugin to check HTML files according to web frontend guidelines


Keywords
validator, rb, bosch
License
Other
Install
npm install gulp-rb-validate-html@1.0.0

Documentation

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());

    });

With Parameter

var rbhtml  = require('gulp-rb-validate-html');

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

     gulp.src('./src/**/*.html')
        .pipe(rbhtml({
            abortOnError: true,
            indent: '\t',
            checkremote: false,
            checkviewport: false
        });

    });

Parameters

abortOnError: Boolean (Default: false)

This will cause the plugin to abort with exit code 1 as soon as an invalid file is detected.

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