react-scroll-parallax
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { ParallaxExample } from 'components'; | ||
import { ParallaxScroller } from 'react-scroll-parallax'; | ||
import 'react-scroll-parallax/libs/ParallaxScrollListener'; | ||
ParallaxScroller.init(); | ||
@@ -7,0 +8,0 @@ const root = document.getElementById('root'); |
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { ParallaxTest } from 'components'; | ||
import { ParallaxScroller } from 'react-scroll-parallax'; | ||
import 'react-scroll-parallax/libs/ParallaxScrollListener'; | ||
ParallaxScroller.init(); | ||
@@ -7,0 +8,0 @@ const root = document.getElementById('root'); |
{ | ||
"name": "react-scroll-parallax", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"description": "React component to create parallax scrolling effects", | ||
@@ -9,3 +9,3 @@ "repository": { | ||
}, | ||
"main": "src/index.js", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
@@ -15,6 +15,9 @@ "dev": "jest && webpack --progress --colors --watch", | ||
"gh-pages": "NODE_ENV=production webpack --progress --colors", | ||
"test": "jest" | ||
"test": "jest", | ||
"prepublish": "babel ./src --out-dir ./lib --presets es2015,react,stage-0 --plugins babel-plugin-add-module-exports" | ||
}, | ||
"jest": { | ||
"modulePaths": ["<rootDir>/src/"] | ||
"modulePaths": [ | ||
"<rootDir>/src/" | ||
] | ||
}, | ||
@@ -35,5 +38,7 @@ "keywords": [ | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.23.1", | ||
"babel-jest": "^20.0.3", | ||
"babel-loader": "^6.3.2", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-env": "^1.1.8", | ||
@@ -40,0 +45,0 @@ "babel-preset-es2015": "^6.24.1", |
@@ -11,3 +11,3 @@ # React Scroll Parallax | ||
## Usage | ||
## Install | ||
@@ -20,6 +20,10 @@ Install | ||
Import `ParallaxScrollListener` on the client side. This will self invoke and create the **global** `ParallaxScrollListener` which will handle updating all parallax elements on scroll. | ||
## Usage | ||
Import `ParallaxScroller` on the client side and call `ParallaxScroller.init()` to create the global singleton `ParallaxScrollListener` which will handle updating all parallax elements on scroll. | ||
``` | ||
import 'react-scroll-parallax/libs/ParallaxScrollListener'; | ||
import { ParallaxScroller } from 'react-scroll-parallax'; | ||
ParallaxScroller.init(); | ||
``` | ||
@@ -26,0 +30,0 @@ |
export Parallax from './components/Parallax'; | ||
export ParallaxScroller from './libs/ParallaxScroller'; |
265786
83
1783
134
23