From a63f5a12047d844a13bd1b29744481a64a0a5fe8 Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Tue, 27 May 2014 02:07:24 +0100 Subject: [PATCH 1/5] chore: remove duplicated jshint options --- .jshintrc | 3 ++- Gruntfile.js | 2 +- src/.jshintrc | 16 ---------------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 src/.jshintrc diff --git a/.jshintrc b/.jshintrc index 1d35ce1..46bbeb9 100644 --- a/.jshintrc +++ b/.jshintrc @@ -17,5 +17,6 @@ "unused": true, "strict": true, "trailing": true, - "smarttabs": true + "smarttabs": true, + "jquery": true } diff --git a/Gruntfile.js b/Gruntfile.js index 6572ae2..ae7c424 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -80,7 +80,7 @@ module.exports = function (grunt) { }, dist: { options: { - jshintrc: 'src/.jshintrc' + jshintrc: '.jshintrc' }, src: ['.tmp/{,*/}*.js'] } diff --git a/src/.jshintrc b/src/.jshintrc deleted file mode 100644 index 1f1ee1d..0000000 --- a/src/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "unused": true, - "boss": true, - "eqnull": true, - "browser": true, - "devel" : true, - "predef": ["jQuery"] -} From 0b5f6c12e3392aab5f61094b988ebb0fb5f8554f Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Tue, 27 May 2014 02:08:04 +0100 Subject: [PATCH 2/5] chore: convert strings to single quotes --- dist/jquery.animatecss.js | 20 ++++++++++---------- dist/jquery.animatecss.min.js | 2 +- src/animatecss.coffee | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dist/jquery.animatecss.js b/dist/jquery.animatecss.js index b79ae5a..66d37a9 100644 --- a/dist/jquery.animatecss.js +++ b/dist/jquery.animatecss.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.3-1 - 2014-05-27 +/*! animateCSS - v1.1.4 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */ @@ -14,19 +14,19 @@ settings = { effect: effect, delay: 0, - animationClass: "animated", + animationClass: 'animated', infinite: false, callback: options, debug: false }; - transitionEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"; + transitionEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; settings = $.extend(settings, options); init = function(element) { return animate(element); }; animate = function(element) { if (settings.infinite === true) { - settings.animationClass += " infinite"; + settings.animationClass += ' infinite'; } return setTimeout(function() { unhide(element); @@ -35,24 +35,24 @@ }, settings.delay); }; addClass = function(element) { - return element.addClass(settings.effect + " " + settings.animationClass + " "); + return element.addClass(settings.effect + ' ' + settings.animationClass + ' '); }; unhide = function(element) { - if (element.css("visibility") === "hidden") { - element.css("visibility", "visible"); + if (element.css('visibility') === 'hidden') { + element.css('visibility', 'visible'); } - if (element.is(":hidden")) { + if (element.is(':hidden')) { return element.show(); } }; removeClass = function(element) { - return element.removeClass(settings.effect + " " + settings.animationClass); + return element.removeClass(settings.effect + ' ' + settings.animationClass); }; callback = function(element) { if (settings.infinite === false) { removeClass(element); } - if (typeof settings.callback === "function") { + if (typeof settings.callback === 'function') { return settings.callback.call(element); } }; diff --git a/dist/jquery.animatecss.min.js b/dist/jquery.animatecss.min.js index a595c02..02e2fb1 100644 --- a/dist/jquery.animatecss.min.js +++ b/dist/jquery.animatecss.min.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.3-1 - 2014-05-27 +/*! animateCSS - v1.1.4 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */ diff --git a/src/animatecss.coffee b/src/animatecss.coffee index f113a43..46316a6 100644 --- a/src/animatecss.coffee +++ b/src/animatecss.coffee @@ -13,13 +13,13 @@ $.fn.extend settings = effect: effect delay: 0 - animationClass: "animated", + animationClass: 'animated', infinite: false callback: options debug: false # Vendor prefixed transition callbacks - transitionEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend" + transitionEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend' # Merge default settings with options. settings = $.extend settings, options @@ -31,7 +31,7 @@ $.fn.extend # Add the animation effect with classes animate = ( element ) -> if settings.infinite == true - settings.animationClass += " infinite" + settings.animationClass += ' infinite' # Run a timer regardless of delay (as 0 will fire instantly anyway) setTimeout -> @@ -42,23 +42,23 @@ $.fn.extend # Add the animation ad effect classes to kick everything off addClass = ( element ) -> - element.addClass( settings.effect + " " + settings.animationClass + " ") + element.addClass( settings.effect + ' ' + settings.animationClass + ' ') # Check if the element has been hidden to start with unhide = ( element ) -> - element.css("visibility", "visible") if element.css( "visibility" ) == "hidden" - element.show() if element.is(":hidden") + element.css('visibility', 'visible') if element.css( 'visibility' ) == 'hidden' + element.show() if element.is(':hidden') # Remove the animation classes the were applied removeClass = ( element ) -> - element.removeClass( settings.effect + " " + settings.animationClass ) + element.removeClass( settings.effect + ' ' + settings.animationClass ) callback = ( element ) -> # Only remove the animation classes if `infinite` is false removeClass( element ) if settings.infinite == false # Check if the callback is a function - if typeof settings.callback == "function" + if typeof settings.callback == 'function' # Execute the callback and return the origin element as `this` settings.callback.call( element ) From 2a1346a6f701d4226016915402077961cdac236c Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Tue, 27 May 2014 02:12:18 +0100 Subject: [PATCH 3/5] docs: add code climate badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4ef8a83..39d6eda 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A jQuery plugin to dynamically apply [Dan Eden's animate.css][animate.css] anima [animate.css]: http://daneden.github.io/animate.css/ +[![Code Climate](https://codeclimate.com/github/craigmdennis/animateCSS.png)](https://codeclimate.com/github/craigmdennis/animateCSS) + ## Getting Started ### Bower From cc6da513d86371a2b2bc7aac4cd813613faf59b8 Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Tue, 27 May 2014 02:15:26 +0100 Subject: [PATCH 4/5] Bumped version to v1.1.5 --- CHANGELOG.md | 6 +++++- animateCSS.jquery.json | 2 +- bower.json | 2 +- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8e250..6ff5b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ - + +### 1.1.5 (2014-05-27) + + + ### 1.1.4-0 (2014-05-27) diff --git a/animateCSS.jquery.json b/animateCSS.jquery.json index 957eb4c..781ff1c 100644 --- a/animateCSS.jquery.json +++ b/animateCSS.jquery.json @@ -2,7 +2,7 @@ "name": "animateCSS", "title": "Animate CSS jQuery Plugin", "description": "A jQuery plugin to dynamically apply animate.css animations with callbacks", - "version": "1.1.4", + "version": "1.1.5", "homepage": "https://github.com/craigmdennis/animateCSS.git", "author": { "name": "Craig Dennis", diff --git a/bower.json b/bower.json index 7d42eae..e18288a 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "animateCSS", "description": "A jQuery plugin to dynamically apply animate.css animations with callbacks", "main": "dist/jquery.animatecss.js", - "version": "1.1.4", + "version": "1.1.5", "dependencies": { "animate.css": "~3.1.1" }, diff --git a/package.json b/package.json index 50edb35..3458ffd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "animateCSS", - "version": "1.1.4", + "version": "1.1.5", "description": "Animate CSS jQuery Plugin", "keywords": [ "jquery-plugin", From beade02ce20eb7a12f85d9a664edb936b9b6ed59 Mon Sep 17 00:00:00 2001 From: Craig Dennis Date: Tue, 27 May 2014 02:22:03 +0100 Subject: [PATCH 5/5] build: generated files and resync version numbers --- dist/jquery.animatecss.js | 2 +- dist/jquery.animatecss.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/jquery.animatecss.js b/dist/jquery.animatecss.js index 66d37a9..7844104 100644 --- a/dist/jquery.animatecss.js +++ b/dist/jquery.animatecss.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.4 - 2014-05-27 +/*! animateCSS - v1.1.5 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */ diff --git a/dist/jquery.animatecss.min.js b/dist/jquery.animatecss.min.js index 02e2fb1..ee50a6c 100644 --- a/dist/jquery.animatecss.min.js +++ b/dist/jquery.animatecss.min.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.4 - 2014-05-27 +/*! animateCSS - v1.1.5 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */