Skip to content

Commit

Permalink
Update to grunt 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Dec 21, 2012
1 parent f55d490 commit c88359e
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 46 deletions.
14 changes: 14 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"node": true,
"es5": true
}
30 changes: 30 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = function(grunt) {
"use strict";

// Project configuration.
grunt.initConfig({
htmllint: {
valid: "test/valid.html",
invalid: "test/*.html"
},
test: {
files: ['test/**/*.js']
},
jshint: {
files: ['Grunfile.js', 'tasks/**/*.js', 'test/**/*.js'],
options: {
jshintrc: ".jshintrc"
}
},
watch: {
files: '<config:lint.files>',
tasks: 'default'
}
});

grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');

grunt.registerTask('default', 'jshint');

};
44 changes: 0 additions & 44 deletions grunt.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/htmllint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function(grunt, files, done) {
var jar = __dirname + '/../vnu.jar';
grunt.utils.spawn({
grunt.util.spawn({
cmd: 'java',
args: ['-Dnu.validator.client.quiet=yes', '-jar', jar].concat(files)
}, function(error, output) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"test": "grunt test"
},
"devDependencies": {
"grunt": "~0.3.9"
"grunt": "0.4.x",
"grunt-contrib-jshint": "0.1.0"
},
"keywords": [
"gruntplugin"
Expand Down
1 change: 1 addition & 0 deletions tasks/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var htmllint = require('../lib/htmllint');

module.exports = function(grunt) {
"use strict";

grunt.registerMultiTask('htmllint', 'Validate html files', function() {
var done = this.async(),
Expand Down
1 change: 1 addition & 0 deletions test/html_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var grunt = require('grunt'),

exports['htmllint'] = {
'helper': function(test) {
"use strict";
test.expect(1);
// tests here
htmllint(grunt, ['test/valid.html', 'test/invalid.html'], function(error, result) {
Expand Down

0 comments on commit c88359e

Please sign in to comment.