react-swipeable
Advanced tools
Comparing version 3.1.0 to 3.3.0
@@ -0,1 +1,10 @@ | ||
# 3.3.0 | ||
* Adds `velocity` data to `onSwiping` callback | ||
* Updated the build process introducing ES2015 and babel | ||
# 3.2.0 | ||
* Adds `preventDefaultTouchMoveEvent` option, defaults to true | ||
# 3.1.0 | ||
@@ -2,0 +11,0 @@ |
{ | ||
"name": "react-swipeable", | ||
"version": "3.1.0", | ||
"version": "3.3.0", | ||
"description": "Swipe bindings for react", | ||
"main": "js/Swipeable.js", | ||
"main": "lib/Swipeable.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build:lib": "babel src --out-dir lib", | ||
"build:publish:examples": "./scripts/build_gh_pages.sh", | ||
"prepublish": "npm run build:lib" | ||
}, | ||
@@ -25,8 +27,16 @@ "keywords": [ | ||
}, | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
"gulp": "^3.8.11", | ||
"gulp-react": "^3.0.1", | ||
"babel-cli": "^6.3.17", | ||
"babel-preset-es2015-loose": "^6.1.4", | ||
"babel-preset-react": "^6.3.13", | ||
"react": ">=0.12.x" | ||
}, | ||
"peerDependencies": { | ||
"react": "^0.12.0 || ^15.0.0-0" | ||
} | ||
} |
@@ -27,3 +27,4 @@ # Swipeable | ||
onSwipedLeft={this.swipedLeft} | ||
onSwiped={this.handleSwipeAction}> | ||
onSwiped={this.handleSwipeAction} | ||
preventDefaultTouchmoveEvent={false}> | ||
<div> | ||
@@ -38,2 +39,5 @@ This element can be swiped | ||
#### Examples: | ||
[http://dogfessional.github.io/react-swipeable/](http://dogfessional.github.io/react-swipeable/) | ||
# Props | ||
@@ -45,2 +49,4 @@ | ||
`onSwiping` in addition to the swipe delta, onSwiping also returns the current absolute X and Y position, as well as the current Velocity of the swipe. `this.props.onSwiping(e, deltaX, deltaY, absX, absY, velocity)` | ||
`onSwipedUp`, `onSwipedRight`, `onSwipedDown`, `onSwipedLeft` calls back with the event | ||
@@ -55,2 +61,4 @@ as well as the x distance, + or -, from where the swipe started to where it ended. These only fire at the end of a touch event. | ||
`preventDefaultTouchmoveEvent` is whether to prevent the browser's `[touchmove](https://developer.mozilla.org/en-US/docs/Web/Events/touchmove)` event. Sometimes you would like the target to scroll natively. The default value is `true`. | ||
### PropTypes | ||
@@ -70,3 +78,4 @@ | ||
flickThreshold: React.PropTypes.number, | ||
delta: React.PropTypes.number | ||
delta: React.PropTypes.number, | ||
preventDefaultTouchmoveEvent: React.PropTypes.bool | ||
``` | ||
@@ -76,18 +85,14 @@ | ||
Initial set up, run: | ||
Initial set up, run `npm install`. | ||
```console | ||
$ npm install | ||
``` | ||
Make changes/updates to the `src/Swipeable.js` file. Then run `npm run build:lib` to build the final output. | ||
For watch on files and JSX transpiling, run: | ||
#### Test changes/updates with the examples | ||
```console | ||
$ gulp | ||
``` | ||
#####Please make updates and changes to the `jsx/Swipeable.jsx`, and have gulp/babel compile the `js/Swipeable.js` file. | ||
cd into `examples` directory, run `npm install` within that directory, and then run `npm start`. | ||
After the server starts you can then view the examples page with your changes at `http://localhost:3000`. | ||
# License | ||
MIT |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
14114
1
93
1
4
6
277
2