Skip to content

Commit

Permalink
Merge pull request #16 from Jimmerz28/master
Browse files Browse the repository at this point in the history
README Clarification
  • Loading branch information
praveenvijayan committed Nov 30, 2013
2 parents 5a0ec1d + bdd45f3 commit cd279b2
Showing 1 changed file with 23 additions and 32 deletions.
55 changes: 23 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,35 @@ One the plugin has been installed, it may be enabled inside your Gruntfile with
grunt.loadNpmTasks('grunt-html-validation');
```

## The "html_validation" task
And add to your task list using `validation`:

```js
grunt.registerTask("default", ["validation"]);
```

## The "validation" task

### Overview
In your project's Gruntfile, add a section named `html_validation` to the data object passed into `grunt.initConfig()`.
In your project's Gruntfile, add a section named `validation` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
validation: {
validation: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
reset: grunt.option('reset') || false,
stoponerror: false,
remotePath: "http://decodize.com/",
remoteFiles: ["html/moving-from-wordpress-to-octopress/",
"css/site-preloading-methods/"], //or
remoteFiles: "validation-files.json", // JSON file contains array of page paths.
relaxerror: ["Bad value X-UA-Compatible for attribute http-equiv on element meta."] //ignores these errors
},
},
})
files: {
src: ['<%= yeoman.app %>/*.html',
'!<%= yeoman.app %>/index.html',
'!<%= yeoman.app %>/modules.html',
'!<%= yeoman.app %>/404.html']
}
}
```

### Options
Expand Down Expand Up @@ -187,28 +200,6 @@ Set `false` for autodetect or chose one of this options:
- ``windows-1256``
- ``windows-1257``

### Usage Examples

```js
validation: {
options: {
reset: grunt.option('reset') || false,
stoponerror: false,
remotePath: "http://decodize.com/",
remoteFiles: ["html/moving-from-wordpress-to-octopress/",
"css/site-preloading-methods/"], //or
remoteFiles: "validation-files.json", // JSON file contains array of page paths.
relaxerror: ["Bad value X-UA-Compatible for attribute http-equiv on element meta."] //ignores these errors
},
files: {
src: ['<%= yeoman.app %>/*.html',
'!<%= yeoman.app %>/index.html',
'!<%= yeoman.app %>/modules.html',
'!<%= yeoman.app %>/404.html']
}
}
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

Expand Down

0 comments on commit cd279b2

Please sign in to comment.