Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Commit

Permalink
module.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiq committed Dec 16, 2013
1 parent d2701fb commit a83b52e
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 54 deletions.
17 changes: 9 additions & 8 deletions build/iscroll-lite.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! iScroll v5.0.8 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
var IScroll = (function (window, document, Math) {
/*! iScroll v5.0.9 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
Expand Down Expand Up @@ -308,11 +308,8 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '5.0.8',
version: '5.0.9',

_init: function () {
this._initEvents();
Expand Down Expand Up @@ -909,8 +906,12 @@ IScroll.prototype = {
}
}
};
IScroll.ease = utils.ease;
IScroll.utils = utils;

return IScroll;
if ( typeof module != 'undefined' && module.exports ) {
module.exports = IScroll;
} else {
window.IScroll = IScroll;
}

})(window, document, Math);
17 changes: 9 additions & 8 deletions build/iscroll-probe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! iScroll v5.0.8 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
var IScroll = (function (window, document, Math) {
/*! iScroll v5.0.9 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
Expand Down Expand Up @@ -323,11 +323,8 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '5.0.8',
version: '5.0.9',

_init: function () {
this._initEvents();
Expand Down Expand Up @@ -1995,8 +1992,12 @@ Indicator.prototype = {
}
};

IScroll.ease = utils.ease;
IScroll.utils = utils;

return IScroll;
if ( typeof module != 'undefined' && module.exports ) {
module.exports = IScroll;
} else {
window.IScroll = IScroll;
}

})(window, document, Math);
17 changes: 9 additions & 8 deletions build/iscroll-zoom.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! iScroll v5.0.8 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
var IScroll = (function (window, document, Math) {
/*! iScroll v5.0.9 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
Expand Down Expand Up @@ -325,11 +325,8 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '5.0.8',
version: '5.0.9',

_init: function () {
this._initEvents();
Expand Down Expand Up @@ -2152,8 +2149,12 @@ Indicator.prototype = {
}
};

IScroll.ease = utils.ease;
IScroll.utils = utils;

return IScroll;
if ( typeof module != 'undefined' && module.exports ) {
module.exports = IScroll;
} else {
window.IScroll = IScroll;
}

})(window, document, Math);
17 changes: 9 additions & 8 deletions build/iscroll.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*! iScroll v5.0.8 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
var IScroll = (function (window, document, Math) {
/*! iScroll v5.0.9 ~ (c) 2008-2013 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
Expand Down Expand Up @@ -320,11 +320,8 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '5.0.8',
version: '5.0.9',

_init: function () {
this._initEvents();
Expand Down Expand Up @@ -1968,8 +1965,12 @@ Indicator.prototype = {
}
};

IScroll.ease = utils.ease;
IScroll.utils = utils;

return IScroll;
if ( typeof module != 'undefined' && module.exports ) {
module.exports = IScroll;
} else {
window.IScroll = IScroll;
}

})(window, document, Math);
8 changes: 4 additions & 4 deletions demos/minimap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@
</div>

<ul id="bookmarks">
<li><a href="javascript:myScroll.scrollTo(-359, -85, 400, IScroll.ease.back)">Face</a></li>
<li><a href="javascript:myScroll.scrollTo(-288, -342, 400, IScroll.ease.back)">Necklace</a></li>
<li><a href="javascript:myScroll.scrollTo(-264, -658, 400, IScroll.ease.back)">Hand</a></li>
<li><a href="javascript:myScroll.scrollTo(-383, -539, 400, IScroll.ease.back)">Ermine</a></li>
<li><a href="javascript:myScroll.scrollTo(-359, -85, 400, IScroll.utils.ease.back)">Face</a></li>
<li><a href="javascript:myScroll.scrollTo(-288, -342, 400, IScroll.utils.ease.back)">Necklace</a></li>
<li><a href="javascript:myScroll.scrollTo(-264, -658, 400, IScroll.utils.ease.back)">Hand</a></li>
<li><a href="javascript:myScroll.scrollTo(-383, -539, 400, IScroll.utils.ease.back)">Ermine</a></li>
</ul>

</body>
Expand Down
2 changes: 1 addition & 1 deletion demos/scroll-to-element/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<li>Pretty row 22</li>
<li>Pretty row 23</li>
<li>Pretty row 24</li>
<li><a href="javascript:myScroll.scrollToElement(document.querySelector('#scroller li:nth-child(50)'), null, null, null, IScroll.ease.elastic)">Scroll to the last element with elastic easing</a></li>
<li><a href="javascript:myScroll.scrollToElement(document.querySelector('#scroller li:nth-child(50)'), 1200, null, null, IScroll.utils.ease.elastic)">Scroll to the last element with elastic easing</a></li>
<li>Pretty row 26</li>
<li>Pretty row 27</li>
<li>Pretty row 28</li>
Expand Down
4 changes: 2 additions & 2 deletions dist/iscroll-lite-min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/iscroll-min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/iscroll-probe-min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/iscroll-zoom-min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "iscroll",
"description": "Smooth scrolling for the web",
"version": "5.0.8",
"version": "5.0.9",
"homepage": "http://cubiq.org/iscroll-4",
"author": "Matteo Spinelli <[email protected]> (http://cubiq.org)",
"keywords": [
Expand All @@ -13,9 +13,10 @@
"mobile",
"desktop"
],
"main": "build/iscroll.js",
"devDependencies": {
"jshint": "~2.3.0",
"uglify-js": "~2.4.6"
"uglify-js": "~2.4.7"
},
"repository": {
"type": "git",
Expand Down
8 changes: 6 additions & 2 deletions src/close.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

IScroll.ease = utils.ease;
IScroll.utils = utils;

return IScroll;
if ( typeof module != 'undefined' && module.exports ) {
module.exports = IScroll;
} else {
window.IScroll = IScroll;
}

})(window, document, Math);
3 changes: 0 additions & 3 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '/* VERSION */',

Expand Down
2 changes: 1 addition & 1 deletion src/open.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var IScroll = (function (window, document, Math) {
(function (window, document, Math) {

0 comments on commit a83b52e

Please sign in to comment.