Skip to content

Commit

Permalink
Merge pull request #47 from lyfeyaj/bugfix/fix-webpack-support
Browse files Browse the repository at this point in the history
fix webpack support #45
  • Loading branch information
lyfeyaj authored Nov 21, 2016
2 parents f697520 + 2b99c08 commit 3ae9ef5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swipe-js",
"version": "2.1.4",
"version": "2.1.5",
"main": [
"./swipe.js"
],
Expand Down
4 changes: 2 additions & 2 deletions build/swipe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"react": "^15.0.0",
"react-dom": "^15.0.0",
"react-hot-loader": "^1.3.0",
"swipejs": "^2.1.4"
"swipejs": "^2.1.5"
},
"devDependencies": {
"autoprefixer-loader": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swipejs",
"version": "2.1.4",
"version": "2.1.5",
"main": "swipe.js",
"description": "Swipe is the most accurate touch slider",
"author": "Brad Birdsall",
Expand Down
18 changes: 13 additions & 5 deletions swipe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Swipe 2.1.4
* Swipe 2.1.5
*
* Brad Birdsall
* Copyright 2013, MIT License
Expand All @@ -14,18 +14,26 @@
// AMD. Register as an anonymous module.
// eslint-disable-next-line no-undef
define([], function(){
return (root.Swipe = factory(root));
root.Swipe = factory();
return root.Swipe;
});
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(root);
module.exports = factory();
} else {
// Browser globals
root.Swipe = factory(root);
root.Swipe = factory();
}
}(this, function (root) {
}(this, function () {
// Establish the root object, `window` (`self`) in the browser, `global`
// on the server, or `this` in some virtual machines. We use `self`
// instead of `window` for `WebWorker` support.
var root = typeof self == 'object' && self.self === self && self ||
typeof global == 'object' && global.global === global && global ||
this;

var _document = root.document || this.document;

function Swipe(container, options) {
Expand Down

0 comments on commit 3ae9ef5

Please sign in to comment.