Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted to AMD + CommonJS compatibility #2

Open
wants to merge 13 commits into
base: gh-pages
Choose a base branch
from
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add dependencies for react, swipe, and object-assign?

"name": "react-swipe",
"description": "Brad Birdsall's Swipe.js, as a React component",
"main": "react-swipe.js",
"authors": [
"Jed Schmidt <[email protected]>"
],
"license": "MIT",
"keywords": [
"react",
"component",
"carousel",
"swipe",
"react-component"
],
"homepage": "https://github.com/C4Tech/react-swipe",
"moduleType": [],
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
5 changes: 4 additions & 1 deletion react-swipe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
(function (root, factory) {
if (typeof module !== 'undefined' && module.exports) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['react', 'swipe-js-iso', 'object-assign'], factory);
}else if (typeof exports === 'object') {
module.exports = factory(
require('react'),
require('swipe-js-iso'),
Expand Down