diff --git a/Gruntfile.js b/Gruntfile.js index 38a31de..0cf8a03 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -49,8 +49,8 @@ module.exports = function(grunt) { } }, watch: { - files: '<%= lint.files %>', - tasks: 'jshint qunit' + files: 'src/*', + tasks: ['jshint', 'build'] }, jshint: { all: ['<%= concat.dist.dest %>'], @@ -73,19 +73,19 @@ module.exports = function(grunt) { } }); - var selenium = require("./tests/selenium.js"); grunt.registerTask('webdriver', 'Browser render tests', function(arg1) { - + var selenium = require("./tests/selenium.js"); var done = this.async(); - if (arguments.length === 0) { - selenium.tests(); - } else { + if (arguments.length) { selenium[arg1].apply(null, arguments); + } else { + selenium.tests(); } }); // Load tasks + grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); diff --git a/package.json b/package.json index 20a1b86..6a847fe 100644 --- a/package.json +++ b/package.json @@ -1,44 +1,45 @@ { - "title": "html2canvas", - "name": "html2canvas", - "description": "Screenshots with JavaScript", - "version": "0.4.1", - "author": { - "name": "Niklas von Hertzen", - "email": "niklasvh@gmail.com", - "url": "http://hertzen.com" - }, - "engines": { - "node": ">=0.8.0" - }, - "dependencies": { - "base64-arraybuffer": ">= 0.1.0", - "png-js": ">= 0.1.1", - "sync-webdriver": ">=0.1.1", - "express": "~3.2.3", - "baconjs": "~0.3.15" - }, - "repository": { - "type": "git", - "url": "git@github.com:niklasvh/html2canvas.git" - }, - "bugs": { - "url": "https://github.com/niklasvh/html2canvas/issues" - }, - "devDependencies": { - "grunt": ">=0.4.0", - "grunt-contrib-concat": "*", - "grunt-contrib-uglify": "*", - "grunt-contrib-jshint": "*", - "grunt-contrib-qunit": "*" - }, - "scripts": { - "test": "grunt travis --verbose" - }, - "homepage": "http://html2canvas.hertzen.com", - "licenses": [ - { - "type": "MIT" - } - ] + "title": "html2canvas", + "name": "html2canvas", + "description": "Screenshots with JavaScript", + "version": "0.4.1", + "author": { + "name": "Niklas von Hertzen", + "email": "niklasvh@gmail.com", + "url": "http://hertzen.com" + }, + "engines": { + "node": ">=0.8.0" + }, + "dependencies": { + "base64-arraybuffer": ">= 0.1.0", + "png-js": ">= 0.1.1", + "sync-webdriver": ">=0.1.1", + "express": "~3.2.3", + "baconjs": "~0.3.15" + }, + "repository": { + "type": "git", + "url": "git@github.com:niklasvh/html2canvas.git" + }, + "bugs": { + "url": "https://github.com/niklasvh/html2canvas/issues" + }, + "devDependencies": { + "grunt": ">=0.4.0", + "grunt-contrib-concat": "*", + "grunt-contrib-uglify": "*", + "grunt-contrib-jshint": "*", + "grunt-contrib-qunit": "*", + "grunt-contrib-watch": "~0.5.1" + }, + "scripts": { + "test": "grunt travis --verbose" + }, + "homepage": "http://html2canvas.hertzen.com", + "licenses": [ + { + "type": "MIT" + } + ] }