Skip to content

Commit

Permalink
Adding lint task, adding default, so a simple �[4mRunning "lint:files…
Browse files Browse the repository at this point in the history
…" (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
  • Loading branch information
carhartl committed Jan 25, 2013
1 parent 2df7ab8 commit 47c76f8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Read cookie:

$.cookie('the_cookie'); // => "the_value"
$.cookie('not_existing'); // => null

Read all available cookies:

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

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

For quick *non cross-browser* testing use grunt:

$ grunt

## Development

- Source hosted at [GitHub](https://github.com/carhartl/jquery-cookie)
Expand Down
62 changes: 34 additions & 28 deletions grunt.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
/*global module */
module.exports = function( grunt ) {
'use strict';
module.exports = function (grunt) {
'use strict';

grunt.initConfig({
qunit: {
files: ['test.html']
},
jshint: {
options: {
boss: true,
browser: true,
curly: false,
devel: true,
eqeqeq: false,
eqnull: true,
expr: true,
evil: true,
immed: false,
laxcomma: true,
newcap: false,
noarg: true,
smarttabs: true,
sub: true,
undef: true
}
}
});
grunt.initConfig({
qunit: {
files: ['test.html']
},
lint: {
files: [
'grunt.js',
'jquery.cookie.js'
]
},
jshint: {
options: {
boss: true,
browser: true,
curly: true,
eqeqeq: true,
eqnull: true,
expr: true,
evil: true,
newcap: true,
noarg: true,
undef: true
},
globals: {
jQuery: true
}
}
});

// Travis CI task.
grunt.registerTask('ci', 'qunit');
grunt.registerTask('default', 'lint qunit');

// Travis CI task.
grunt.registerTask('ci', 'default');
};

0 comments on commit 47c76f8

Please sign in to comment.