diff --git a/dist/switchery.js b/dist/switchery.js index 4c3dc6f..5bec6c9 100644 --- a/dist/switchery.js +++ b/dist/switchery.js @@ -56,11 +56,11 @@ require.helper.semVerSort = function(a, b) { /** * Find and require a module which name starts with the provided name. - * If multiple modules exists, the highest semver is used. + * If multiple modules exists, the highest semver is used. * This function can only be used for remote dependencies. * @param {String} name - module name: `user~repo` - * @param {Boolean} returnPath - returns the canonical require path if true, + * @param {Boolean} returnPath - returns the canonical require path if true, * otherwise it returns the epxorted module */ require.latest = function (name, returnPath) { @@ -83,7 +83,7 @@ require.latest = function (name, returnPath) { semVerCandidates.push({version: version, name: moduleName}); } else { otherCandidates.push({version: version, name: moduleName}); - } + } } } if (semVerCandidates.concat(otherCandidates).length === 0) { @@ -2659,9 +2659,12 @@ extend(Hammer, { }); if (typeof define == TYPE_FUNCTION && define.amd) { - define(function() { - return Hammer; - }); + // Temp fix for RequireJS + module.exports = Hammer; + + // define(function() { + // return Hammer; + // }); } else if (typeof module != 'undefined' && module.exports) { module.exports = Hammer; } else { @@ -3410,7 +3413,7 @@ FastClick.notNeeded = function(layer) { if (FastClick.prototype.deviceIsAndroid) { metaViewport = document.querySelector('meta[name=viewport]'); - + if (metaViewport) { // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) if (metaViewport.content.indexOf('user-scalable=no') !== -1) { @@ -3449,12 +3452,15 @@ FastClick.attach = function(layer) { if (typeof define !== 'undefined' && define.amd) { + // Temp fix for RequireJS. + module.exports = FastClick.attach; + module.exports.FastClick = FastClick; // AMD. Register as an anonymous module. - define(function() { - 'use strict'; - return FastClick; - }); + // define(function() { + // 'use strict'; + // return FastClick; + // }); } else if (typeof module !== 'undefined' && module.exports) { module.exports = FastClick.attach; module.exports.FastClick = FastClick;