Skip to content

Commit 47c76f8

Browse files
committed
Adding lint task, adding default, so a simple �[4mRunning "lint:files" (lint) task�[24m
Lint free. �[4mRunning "qunit:files" (qunit) task�[24m Testing test.html..........................�[32mOK�[39m �[32m>> �[39m30 assertions passed (72ms) �[32mDone, without errors.�[39m will lint and run tests
1 parent 2df7ab8 commit 47c76f8

2 files changed

Lines changed: 39 additions & 29 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Read cookie:
2929

3030
$.cookie('the_cookie'); // => "the_value"
3131
$.cookie('not_existing'); // => null
32-
32+
3333
Read all available cookies:
3434

3535
$.cookie(); // => { "the_cookie": "the_value", "...remaining": "cookies" }
@@ -104,6 +104,10 @@ Open in browser:
104104

105105
$ open http://0.0.0.0:8124/test.html
106106

107+
For quick *non cross-browser* testing use grunt:
108+
109+
$ grunt
110+
107111
## Development
108112

109113
- Source hosted at [GitHub](https://github.com/carhartl/jquery-cookie)

‎grunt.js‎

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
/*global module */
2-
module.exports = function( grunt ) {
3-
'use strict';
2+
module.exports = function (grunt) {
3+
'use strict';
44

5-
grunt.initConfig({
6-
qunit: {
7-
files: ['test.html']
8-
},
9-
jshint: {
10-
options: {
11-
boss: true,
12-
browser: true,
13-
curly: false,
14-
devel: true,
15-
eqeqeq: false,
16-
eqnull: true,
17-
expr: true,
18-
evil: true,
19-
immed: false,
20-
laxcomma: true,
21-
newcap: false,
22-
noarg: true,
23-
smarttabs: true,
24-
sub: true,
25-
undef: true
26-
}
27-
}
28-
});
5+
grunt.initConfig({
6+
qunit: {
7+
files: ['test.html']
8+
},
9+
lint: {
10+
files: [
11+
'grunt.js',
12+
'jquery.cookie.js'
13+
]
14+
},
15+
jshint: {
16+
options: {
17+
boss: true,
18+
browser: true,
19+
curly: true,
20+
eqeqeq: true,
21+
eqnull: true,
22+
expr: true,
23+
evil: true,
24+
newcap: true,
25+
noarg: true,
26+
undef: true
27+
},
28+
globals: {
29+
jQuery: true
30+
}
31+
}
32+
});
2933

30-
// Travis CI task.
31-
grunt.registerTask('ci', 'qunit');
34+
grunt.registerTask('default', 'lint qunit');
35+
36+
// Travis CI task.
37+
grunt.registerTask('ci', 'default');
3238
};

0 commit comments

Comments
 (0)