mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
add grunt watch
This commit is contained in:
parent
73698e8ceb
commit
832b9ee934
14
Gruntfile.js
14
Gruntfile.js
@ -49,8 +49,8 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
files: '<%= lint.files %>',
|
files: 'src/*',
|
||||||
tasks: 'jshint qunit'
|
tasks: ['jshint', 'build']
|
||||||
},
|
},
|
||||||
jshint: {
|
jshint: {
|
||||||
all: ['<%= concat.dist.dest %>'],
|
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) {
|
grunt.registerTask('webdriver', 'Browser render tests', function(arg1) {
|
||||||
|
var selenium = require("./tests/selenium.js");
|
||||||
var done = this.async();
|
var done = this.async();
|
||||||
|
|
||||||
if (arguments.length === 0) {
|
if (arguments.length) {
|
||||||
selenium.tests();
|
|
||||||
} else {
|
|
||||||
selenium[arg1].apply(null, arguments);
|
selenium[arg1].apply(null, arguments);
|
||||||
|
} else {
|
||||||
|
selenium.tests();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load tasks
|
// Load tasks
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
"grunt-contrib-concat": "*",
|
"grunt-contrib-concat": "*",
|
||||||
"grunt-contrib-uglify": "*",
|
"grunt-contrib-uglify": "*",
|
||||||
"grunt-contrib-jshint": "*",
|
"grunt-contrib-jshint": "*",
|
||||||
"grunt-contrib-qunit": "*"
|
"grunt-contrib-qunit": "*",
|
||||||
|
"grunt-contrib-watch": "~0.5.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "grunt travis --verbose"
|
"test": "grunt travis --verbose"
|
||||||
|
Loading…
Reference in New Issue
Block a user