Skip to content

Commit 33a3ac6

Browse files
committed
Added "grunt dev" task
1 parent 11c8a89 commit 33a3ac6

File tree

2 files changed

+42
-30
lines changed

2 files changed

+42
-30
lines changed

Gruntfile.coffee

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ module.exports = (grunt) ->
1010
port: 8080
1111
base: "./"
1212
keepalive: true
13-
13+
dev: # pass on, so subsequent tastks (like watch) can start
14+
options:
15+
port: 8080
16+
base: "./"
17+
keepalive: false
1418
sauce:
1519
options:
1620
hostname: "localhost"
@@ -29,7 +33,7 @@ module.exports = (grunt) ->
2933
cmd: "pyftpsync --progress upload . ftp://www.wwwendt.de/tech/demo/jquery-contextmenu --delete-unmatched --omit dist,node_modules,.*,_* -x"
3034

3135
jshint:
32-
files: ["Gruntfile.js", "jquery.ui-contextmenu.js", "test/tests.js"]
36+
files: ["jquery.ui-contextmenu.js", "test/tests.js"]
3337
options:
3438
jshintrc: ".jshintrc"
3539

@@ -70,12 +74,19 @@ module.exports = (grunt) ->
7074
src: "jquery.ui-contextmenu.js"
7175
dest: "jquery.ui-contextmenu.min.js"
7276

77+
watch:
78+
jshint:
79+
options:
80+
atBegin: true
81+
files: ["jquery.ui-contextmenu.js"]
82+
tasks: ["jshint"]
7383

7484
# Load "grunt*" dependencies
7585
for key of grunt.file.readJSON("package.json").devDependencies
7686
grunt.loadNpmTasks key if key isnt "grunt" and key.indexOf("grunt") is 0
7787

7888
grunt.registerTask "server", ["connect:demo"]
89+
grunt.registerTask "dev", ["connect:dev", "watch:jshint"]
7990
grunt.registerTask "test", ["jshint", "qunit"]
8091
grunt.registerTask "sauce", ["connect:sauce", "saucelabs-qunit"]
8192
if parseInt(process.env.TRAVIS_PULL_REQUEST, 10) > 0

package.json

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,50 @@
44
"title": "jQuery UI context menu plugin",
55
"description": "Turn a jQuery UI Menu widget into a contextmenu.",
66
"keywords": [
7-
"context-menu",
8-
"contextmenu",
9-
"delegate",
10-
"jquery-ui-menu",
11-
"menu",
12-
"navigation",
13-
"popup",
14-
"right-click",
15-
"right-click-menu"
7+
"context-menu",
8+
"contextmenu",
9+
"delegate",
10+
"jquery-ui-menu",
11+
"menu",
12+
"navigation",
13+
"popup",
14+
"right-click",
15+
"right-click-menu"
1616
],
1717
"author": {
18-
"name": "Martin Wendt",
19-
"email": "jquery@wwwendt.de",
20-
"url": "http://careers.stackoverflow.com/martin-wendt"
18+
"name": "Martin Wendt",
19+
"email": "jquery@wwwendt.de",
20+
"url": "http://careers.stackoverflow.com/martin-wendt"
2121
},
2222
"repository": {
23-
"type": "git",
24-
"url": "https://github.com/mar10/jquery-ui-contextmenu"
23+
"type": "git",
24+
"url": "https://github.com/mar10/jquery-ui-contextmenu"
2525
},
2626
"homepage": "https://github.com/mar10/jquery-ui-contextmenu",
2727
"demo": "http://wwwendt.de/tech/demo/jquery-contextmenu/demo/",
2828
"docs": "https://github.com/mar10/jquery-ui-contextmenu/blob/master/README.md",
2929
"bugs": "https://github.com/mar10/jquery-ui-contextmenu/issues",
3030
"licenses": [
31-
{
32-
"type": "MIT",
33-
"url": "https://github.com/mar10/jquery-ui-contextmenu/blob/master/MIT-LICENSE.txt"
34-
}
31+
{
32+
"type": "MIT",
33+
"url": "https://github.com/mar10/jquery-ui-contextmenu/blob/master/MIT-LICENSE.txt"
34+
}
3535
],
3636
"dependencies": {
37-
"jquery": ">=1.7"
37+
"jquery": ">=1.7"
3838
},
3939
"devDependencies": {
40-
"grunt": "~0.4.1",
41-
"grunt-contrib-concat": "~0.1.3",
42-
"grunt-contrib-connect": "~0.3.0",
43-
"grunt-contrib-jshint": "~0.3.0",
44-
"grunt-contrib-qunit": "~0.2.0",
45-
"grunt-contrib-uglify": "~0.2.0",
46-
"grunt-exec": "~0.4.0",
47-
"grunt-saucelabs": "~4.1.2"
40+
"grunt": "~0.4.1",
41+
"grunt-contrib-concat": "~0.1.3",
42+
"grunt-contrib-connect": "~0.3.0",
43+
"grunt-contrib-jshint": "~0.3.0",
44+
"grunt-contrib-qunit": "~0.2.0",
45+
"grunt-contrib-uglify": "~0.2.0",
46+
"grunt-exec": "~0.4.0",
47+
"grunt-saucelabs": "~4.1.2",
48+
"grunt-contrib-watch": "~0.5.3"
4849
},
4950
"scripts": {
50-
"test": "grunt ci --verbose"
51+
"test": "grunt ci --verbose"
5152
}
5253
}

0 commit comments

Comments
 (0)