Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 19e739e

Browse files
jzaeffererscottgonzalez
authored andcommitted
Grunt: Add watch task to rebuild on src changes
Fixes gh-236 Closes gh-238
1 parent 983f24c commit 19e739e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Gruntfile.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function(grunt) {
22
grunt.loadNpmTasks('grunt-contrib-jshint');
33
grunt.loadNpmTasks('grunt-contrib-uglify');
4+
grunt.loadNpmTasks('grunt-contrib-watch');
45
grunt.loadNpmTasks('grunt-git-authors');
56
grunt.loadNpmTasks('grunt-jscs');
67
grunt.loadNpmTasks('intern');
@@ -80,6 +81,15 @@ module.exports = function(grunt) {
8081
jshintrc: true
8182
},
8283
main: allFiles
84+
},
85+
watch: {
86+
src: {
87+
files: ['src/*', 'pointerevents.js'],
88+
tasks: ['build', 'lint'],
89+
options: {
90+
spawn: false
91+
}
92+
}
8393
}
8494
});
8595

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
"type": "git",
1212
"url": "git://github.com/jquery/PEP.git"
1313
},
14-
"files": ["dist/", "src/", "pointerevents.js", "samples/"],
14+
"files": [
15+
"dist/",
16+
"src/",
17+
"pointerevents.js",
18+
"samples/"
19+
],
1520
"bugs": "https://github.com/jquery/PEP/issues",
1621
"license": "MIT",
1722
"devDependencies": {
@@ -24,6 +29,7 @@
2429
"grunt": "~0.4.1",
2530
"grunt-contrib-jshint": "0.11.2",
2631
"grunt-contrib-uglify": "^0.4.0",
32+
"grunt-contrib-watch": "^0.6.1",
2733
"grunt-git-authors": "^3.0.0",
2834
"grunt-jscs": "1.8.0",
2935
"intern": "2.2.2",

0 commit comments

Comments
 (0)