From 5e926caba8f03f2481123b2244a124cd0b853b72 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Thu, 21 Jan 2016 15:58:36 +0000 Subject: [PATCH 1/3] add package.json --- package.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..3499f76 --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "jquery-parallax", + "version": "1.0.0", + "description": " Used to recreate the Nike Better World parallax effect", + "main": "scripts/jquery.parallax-1.1.3.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/IanLunn/jQuery-Parallax.git" + }, + "author": "Ian Lunn", + "license": "MIT", + "bugs": { + "url": "https://github.com/IanLunn/jQuery-Parallax/issues" + }, + "homepage": "https://github.com/IanLunn/jQuery-Parallax#readme" +} From 908c387b328bf021c1f8cb2e86b130f750e5989d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 2 Feb 2016 11:15:07 +0000 Subject: [PATCH 2/3] add UMD loader --- scripts/jquery.parallax-1.1.3.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/jquery.parallax-1.1.3.js b/scripts/jquery.parallax-1.1.3.js index f3569dc..7b24486 100644 --- a/scripts/jquery.parallax-1.1.3.js +++ b/scripts/jquery.parallax-1.1.3.js @@ -10,8 +10,15 @@ Dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html */ - -(function( $ ){ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof module === 'object' && module.exports) { + factory(require('jquery')); + } else { + factory(root.jQuery); + } +}(this, function ($) { var $window = $(window); var windowHeight = $window.height(); @@ -66,4 +73,4 @@ http://www.gnu.org/licenses/gpl.html $window.bind('scroll', update).resize(update); update(); }; -})(jQuery); +})); From 8c94afe4ecc3315af114776048f419221b51278b Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Tue, 2 Feb 2016 11:15:47 +0000 Subject: [PATCH 3/3] update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3499f76..b97ca6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jquery-parallax", - "version": "1.0.0", + "version": "1.0.1", "description": " Used to recreate the Nike Better World parallax effect", "main": "scripts/jquery.parallax-1.1.3.js", "scripts": {