Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README Clarification #16

Merged
merged 2 commits into from
Nov 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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