Permalink
Browse files

Update to grunt 0.4

  • Loading branch information...
jzaefferer committed Dec 21, 2012
1 parent f55d490 commit c88359e9be26f9a8a2d146725204738c97f81cf9
Showing with 49 additions and 46 deletions.
  1. +14 −0 .jshintrc
  2. +30 −0 Gruntfile.js
  3. +0 −44 grunt.js
  4. +1 −1 lib/htmllint.js
  5. +2 −1 package.json
  6. +1 −0 tasks/html.js
  7. +1 −0 test/html_test.js
View
@@ -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
+}
View
@@ -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');
+
+};
View
@@ -1,44 +0,0 @@
-module.exports = function(grunt) {
-
- // Project configuration.
- grunt.initConfig({
- htmllint: {
- valid: "test/valid.html",
- invalid: "test/*.html"
- },
- test: {
- files: ['test/**/*.js']
- },
- lint: {
- files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js']
- },
- watch: {
- files: '<config:lint.files>',
- tasks: 'default'
- },
- jshint: {
- options: {
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- boss: true,
- eqnull: true,
- node: true,
- es5: true
- },
- globals: {}
- }
- });
-
- // Load local tasks.
- grunt.loadTasks('tasks');
-
- // Default task.
- grunt.registerTask('default', 'lint test');
-
-};
View
@@ -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) {
View
@@ -28,7 +28,8 @@
"test": "grunt test"
},
"devDependencies": {
- "grunt": "~0.3.9"
+ "grunt": "0.4.x",
+ "grunt-contrib-jshint": "0.1.0"
},
"keywords": [
"gruntplugin"
View
@@ -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(),
View
@@ -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) {

0 comments on commit c88359e

Please sign in to comment.