From 47c76f863289bc10dff5d24230eb1d2fd4e48af1 Mon Sep 17 00:00:00 2001 From: Klaus Hartl Date: Fri, 25 Jan 2013 10:11:18 +0100 Subject: [PATCH] =?UTF-8?q?Adding=20lint=20task,=20adding=20default,=20so?= =?UTF-8?q?=20a=20simple=20=1B[4mRunning=20"lint:files"=20(lint)=20task=1B?= =?UTF-8?q?[24m=20Lint=20free.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running "qunit:files" (qunit) task Testing test.html..........................OK >> 30 assertions passed (72ms) Done, without errors. will lint and run tests --- README.md | 6 +++++- grunt.js | 62 ++++++++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 01b6b4e..49d7b36 100644 --- a/README.md +++ b/README.md @@ -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" } @@ -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) diff --git a/grunt.js b/grunt.js index 5a4c12e..fa9aff0 100644 --- a/grunt.js +++ b/grunt.js @@ -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'); };