0.0.1 • Published 10 years ago

grunt-w3c-markup-validation v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

grunt-w3c-markup-validation

Build Status

Grunt task for W3C validation of markup

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-w3c-markup-validation --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-w3c-markup-validation');

Using the task

This task can be used to validate markup in local files or hosted in a site. Here is an example of it's use within a grunt file:

      grunt.initConfig({
        w3c_markup_validation : {
  				failOnError : true,
  				pages : ['./test-pages/fails.html', 'http://www.google.com'],
  				ignore : ['no document type delaration']
  			}
			});
			
			task('default', ['w3c_markup_validation']);

options

namedescription
pagesthe pages to validate
failOnErrorshould grunt stop if an error is encountered? (default is false)
ignoreignore any errors containing the specified text